Quick answer
How do you use Screen Sharing over SSH?
Run ssh -L 5901:localhost:5900 USER@MAC_IP, keep it open, then connect a VNC client to localhost:5901; on a Mac, open vnc://localhost:5901 launches Screen Sharing. RentCloudMac Macs, from $92 a month and paid in Monero or Bitcoin, have Screen Sharing on and reachable this way with the same account.
In brief
- The tunnel: local port 5901 on your computer forwards to port 5900 on the Mac, inside SSH.
- From a Mac:
open vnc://localhost:5901uses the built-in Screen Sharing app. - From Windows or Linux: RealVNC Viewer, or TigerVNC/Remmina if a VNC password is set.
- Sign-in: the macOS user name and password of the account on the remote Mac.
- Why 5901 locally: it avoids clashing with a Screen Sharing service on your own Mac.
Which steps open the remote desktop?
Test plain SSH
Connect once with the command from the dashboard so the host key is accepted and the login works.
Open the tunnel
Run ssh -N -L 5901:localhost:5900 USER@MAC_IP. -N keeps the session for forwarding only.
Start the viewer
On a Mac: open vnc://localhost:5901. On Windows or Linux: point the VNC viewer at localhost:5901.
Sign in
Type the remote account's user name and password; choose to control the screen.
Close cleanly
Quit the viewer, then press Ctrl+C in the tunnel window.
# tunnel only, no shell
ssh -N -L 5901:localhost:5900 USER@MAC_IP
# in another Terminal, on a Mac client
open vnc://localhost:5901
# Linux client with Remmina or TigerVNC
vncviewer localhost:5901Host cloudmac
HostName MAC_IP
User USER
LocalForward 5901 localhost:5900
ServerAliveInterval 30
ServerAliveCountMax 4Why is 5900 not open to the internet?
Because a public VNC port is scanned and attacked constantly, while SSH with a key is not guessable. Screen Sharing listens on the Mac, but traffic from outside should only ever reach it through your SSH session. That keeps one door to guard. Log in over SSH with the public key you paste at checkout (no key: the dashboard shows a temporary password); Screen Sharing (VNC) is switched on and opened through an SSH tunnel on that same login.
If you also enable the macOS application firewall, SSH and loopback traffic keep working; the steps are in how to secure a cloud Mac.
Which VNC client should you use from each system?
| Your computer | Client | macOS sign-in supported | Note |
|---|---|---|---|
| macOS | Screen Sharing (built in) | Yes | open vnc://localhost:5901 |
| Windows | RealVNC Viewer | Yes | Free viewer |
| Windows | TigerVNC Viewer | Usually needs a VNC password | Open source |
| Linux | Remmina | Depends on plugin | VNC plugin, localhost:5901 |
| iPad | Screens or a VNC app with SSH tunnelling | Varies by app | Check the app's SSH support |
How do you make the remote desktop feel faster?
Lower the colour depth or scaling in the viewer, close animations on the Mac, and rent in the data centre nearest to you. Screen Sharing sends only changed regions of the screen, so a static Xcode window costs little; scrolling and video cost most. In System Settings, Accessibility, Display, "Reduce motion" and "Reduce transparency" help. The Mac sits in Amsterdam in the Netherlands or Dallas in the United States, at the same price.
RentCloudMac checked 7 cloud Mac sellers on 3 December 2026, and none of them took crypto; RentCloudMac takes Monero, Bitcoin, USDT and four other coins for the same kind of desktop.
Is there a headless display on a data-centre Mac?
A Mac mini without a monitor still runs a desktop session, and Screen Sharing shows it at a default resolution. You can change the resolution in System Settings, Displays, from inside the Screen Sharing window. If a viewer shows a black screen, the session may be at the login window: sign in through the viewer. For Windows specifics, read connect to a cloud Mac from Windows; dashboard fields are explained in SSH and Screen Sharing help.
What questions come up about Screen Sharing over SSH?
The viewer says connection refused. What should I check?
That the tunnel window is still open and showed no error, that you used localhost:5901 and not the Mac's IP, and that plain SSH works.
Can I use port 5900 locally?
On Windows or Linux, yes. On a Mac client, 5900 may already be taken by your own Screen Sharing, hence 5901.
Does audio come through?
No. macOS Screen Sharing carries the screen, keyboard, mouse and clipboard, not sound.
Can I copy and paste between my computer and the Mac?
Yes, text through the shared clipboard in most clients; for files use scp or sftp.
Is the Screen Sharing session encrypted?
Inside the SSH tunnel, yes: everything between your computer and the Mac travels encrypted by SSH.
Verdict
- One
ssh -L 5901:localhost:5900line gives you the Mac's desktop safely from any system. - Use the built-in client on a Mac and RealVNC Viewer on Windows.
- Keep 5900 closed to the internet. Plans start at $92 on pricing.
Open a Mac desktop of your own
Compile: M4 · 16 GB · 256 GB, Screen Sharing on, paid in crypto with no KYC.
- Sold by RentCloudMac LLC, New Mexico, USA
- Mac ready within 24 hours, prepared by a person
- No KYC, no email required
- Lost days credited back to the balance
Sources (3)
- Turn Screen Sharing on or off on Mac — Apple
- ssh(1) manual: -L local forwarding — OpenBSD
- RealVNC Viewer download — RealVNC
Read next
- Cloud Mac mini pricesRentCloudMac rents a whole Mac mini M4 from $92 a month, 10% off on 12 months, paid in Bitcoin, USDT or Monero, no KYC. Options and CI pack.
- Connect from WindowsReach a rented Mac mini from Windows 10 or 11 with OpenSSH and a VNC viewer. Macs from $92 a month, paid in Monero, no KYC.
- Connect with SSH and Screen SharingLog in to your RentCloudMac Mac with SSH, then open Screen Sharing through an SSH tunnel from macOS, Windows or Linux. From $92/mo.
- Best cloud Mac for Windows usersBest cloud Mac for Windows users: Xcode and Safari on a whole Mac mini M4 from $92 a month, via SSH and VNC, paid in Monero.
- Secure a cloud MacHarden a rented Mac mini: change the temporary password, keys only for SSH, firewall on, updates and signing keys. Macs from $92/month.