# How do I connect to a RemoteMacMini Mac?

> Connect to a RemoteMacMini Mac: SSH with a key or temporary password, then the macOS desktop through Screen Sharing over an SSH tunnel.

- URL: https://remotemacmini.com/help/connect-with-ssh-and-screen-sharing/
- Last updated: 2026-11-17
- Publisher: RemoteMacMini (https://remotemacmini.com)

**Quick answer — How do I connect to a RemoteMacMini Mac?**

Copy the login command from the **RemoteMacMini** dashboard and run it in a terminal: SSH opens with your key, or with the temporary password shown. For the macOS desktop, open an SSH tunnel to port 5900 and point a VNC client at localhost. Both use the same account, and port 5900 is never open to the internet.

**In brief**

- **SSH**: the command shown under the Mac, with your key or the temporary password.
- **Desktop**: Screen Sharing through `ssh -L 5900:localhost:5900`.
- **Clients**: the macOS Screen Sharing app, or any VNC viewer on Windows and Linux.
- **First step**: change a temporary password with `passwd`.

## Which tool connects from which computer?

*Ways to reach a RemoteMacMini Mac from macOS, Windows and Linux*

| From | Terminal (SSH) | Desktop (Screen Sharing) |
| --- | --- | --- |
| macOS | Terminal: `ssh user@IP` | Screen Sharing app at `vnc://localhost:5900` after the tunnel |
| Windows 10 or 11 | PowerShell: built-in OpenSSH `ssh user@IP` | A VNC viewer at `localhost:5900` after the tunnel |
| Linux | `ssh user@IP` | Remmina or another VNC viewer at `localhost:5900` |

## How do I open the first SSH session?

**Copy the command from the Mac's page in the dashboard and paste it into a terminal.** With a key given at checkout, it logs in at once. Without one, type the temporary password shown, then run `passwd` to set your own; the shown password stops working. To add a key later, append your public key to `~/.ssh/authorized_keys` on the Mac.

## How do I open the macOS desktop safely?

**Start a tunnel, then connect the viewer to your own machine.** Run `ssh -L 5900:localhost:5900 user@IP` and keep it open. In a second window, open the VNC viewer at `localhost:5900` and log in with the same macOS account. The traffic travels inside SSH, so nothing listens on the internet. Windows users find client choices in [Screen Sharing from Windows](https://remotemacmini.com/guides/how-to-use-screen-sharing-from-windows/ "How do I use Screen Sharing from Windows?").

## How do I move files to and from the Mac?

**Use `scp` or `rsync` over the same SSH login, or clone from your Git remote.** For example: `rsync -av ./MyApp/ user@IP:~/MyApp/`. Large Xcode projects copy faster as a Git clone on the Mac. More options are in [moving files to a remote Mac](https://remotemacmini.com/guides/how-to-transfer-files-to-a-remote-mac/ "How do I transfer files to a remote Mac?").

## What if the connection fails?

**Check the status first: only a Running Mac accepts connections.** "Connection refused" right after delivery often means a typo in the user name. "Permission denied (publickey)" means the key in your agent is not the one given at checkout. According to RemoteMacMini's support rule, A person answers support emails within 12 hours, seven days a week. A Mac that stays unreachable is covered in [a Mac that is late or unreachable](https://remotemacmini.com/help/mac-not-delivered-or-unreachable/ "What if a RemoteMacMini Mac is not delivered or unreachable?").

## Can several people use the same Mac?

**Apple’s licence makes the customer the sole user of a leased Mac, so one team account works, but the Mac cannot be shared as a service.** Members of the same team can log in with their own SSH keys added to `~/.ssh/authorized_keys`, for builds and tests of that team’s software. Reselling access, or opening it to outside users, breaks the licence and the acceptable use policy.

## How do I keep the session alive during long builds?

**Run long jobs inside `tmux` or `screen`, or as a launch agent, so a dropped connection does not stop them.** Install tmux with Homebrew (`brew install tmux`), start a session with `tmux new -s build`, run the build, and detach with Ctrl-B then D. Reattach later with `tmux attach -t build`. Adding `ServerAliveInterval 60` to your SSH config also keeps idle tunnels open through home routers.

## Connection questions

### Which user do I log in as?

The user shown in the dashboard command. It has administrator rights: Full administrator rights: install Xcode, Homebrew, runners and any software, change any setting.

### Can I use Apple Remote Desktop?

Screen Sharing is the supported path. Other remote desktop tools can be installed by you, over the SSH tunnel.

### Is the desktop slow?

Screen Sharing over a tunnel suits Xcode and the Simulator. Builds and tests run faster from the command line over SSH.

### Can I open other ports?

Yes, with administrator rights and the macOS firewall settings; keep remote access behind SSH where possible.

**Verdict**

- **Use SSH for builds** and the tunnel for the desktop.
- **Never open port 5900** to the internet.

**** Pip is ready to build with SSH and Screen Sharing. [Rent Pip for one month](https://remotemacmini.com/app/checkout/?plan=pip&term=1m&from=help-connect-with-ssh-and-screen-sharing&lang=en)

---

RemoteMacMini: RemoteMacMini rents dedicated Apple Mac minis (M4 and M4 Pro) in data centres for building, signing and testing iOS and macOS apps: one whole Mac per customer, reached over SSH and Screen Sharing. Five plans cost $76.50 to $247.49 a month, each 10% under the lowest comparable offer read on 17 November 2026, paid in crypto with no ID document.
