TürkiyeVPS

Connecting to a Remote Mac over VNC and SSH: Windows, Mac and Linux

How to connect to a rented or remote Mac from Windows, macOS and Linux over SSH and VNC (Screen Sharing): SSH keys, VNC through an SSH tunnel, performance settings and common errors.

5 min read

You use a remote Mac in two ways: SSH for the command line and VNC (called Screen Sharing on macOS) for the desktop. This guide shows how to connect to a rented Mac mini or your own remote Mac from Windows, macOS and Linux, how to make the connection secure, and how to fix common problems.

Quick summary: For SSH, ssh username@IP is all you need; Windows 10/11 has an SSH client built in. For the desktop, use a VNC client on Windows (for example RealVNC Viewer) or Screen Sharing from the Finder on a Mac. For a safer connection, open VNC through an SSH tunnel. With TürkiyeVPS rented Mac mini plans, SSH (22) and VNC (5900) access is ready on delivery.

What you need before connecting

  • The Mac's IP address (on a rented Mac it is in your delivery details)
  • Your macOS username and password
  • Remote Login (SSH) and Screen Sharing must be on. On your own Mac, turn them on under System Settings → General → Sharing; on a rented Mac they come ready.

Connecting over SSH

Windows

Windows 10 and 11 come with the OpenSSH client. Open PowerShell or Windows Terminal:

ssh username@IP-address

On first connection you are asked to confirm the server's fingerprint; type yes, then enter your password. You can also use a program like PuTTY.

macOS and Linux

The same command works in Terminal:

ssh username@IP-address

An SSH key instead of a password

Signing in with a key is both safer and more convenient. Create a key on your own computer:

ssh-keygen -t ed25519

On macOS and Linux, send the key to the Mac with:

ssh-copy-id username@IP-address

Windows has no ssh-copy-id; use this in PowerShell instead:

type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh username@IP-address "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys"

For SSH basics, see What is SSH?.

Connecting over VNC (Screen Sharing)

macOS screen sharing uses the VNC protocol on port 5900.

  • Windows: install a VNC client that supports macOS authentication, such as RealVNC Viewer. Enter IP-address (or IP-address:5900) and type your macOS username and password in the login window.
  • macOS: in the Finder open Go → Connect to Server and type vnc://IP-address. The Screen Sharing app opens.
  • Linux: use a client such as Remmina or TigerVNC, choose the VNC protocol and connect.

Safer: open VNC through an SSH tunnel

If you send VNC traffic inside an SSH tunnel, your screen and keystrokes travel encrypted. First open the tunnel:

ssh -L 5901:localhost:5900 username@IP-address

While this window stays open, connect your VNC client to localhost:5901. The connection goes from your computer to the Mac over SSH.

Making the picture smoother

  • Set the picture quality in your VNC client to "automatic" or "medium".
  • Don't keep the Mac's screen resolution very high; a smaller resolution means less data.
  • Run long builds over SSH instead of VNC; open the desktop only for tasks that need the interface.
  • The closer the Mac, the lower the latency. A Mac in Istanbul has low latency from Turkey and nearby countries.

Restarting remotely

If needed, you can restart the Mac over SSH:

sudo shutdown -r now

The Mac comes back within a few minutes and SSH and Screen Sharing are available again. Screen Sharing also works at the macOS login screen, where you sign in with your username and password.

Common problems

Problem Likely cause and fix
Connection refused Remote Login is off or the Mac is restarting; wait a few minutes and try again.
Connection timed out Wrong IP address, or your network blocks the port; try from another network.
Black screen in VNC The Mac may be waking up; wait, or close and reopen the connection.
VNC rejects the password Make sure you entered your macOS username and password and that the client supports macOS authentication.
Signing error over SSH The login keychain may be locked: security unlock-keychain ~/Library/Keychains/login.keychain-db

Security tips

  • Change your password at first login (passwd).
  • Switch to SSH key login; once the key works, you can consider turning off password login.
  • Use VNC through an SSH tunnel when you can.
  • Don't share credentials as plain text within your team.

Once you are connected, continue with our remote Mac guide for Xcode for setup and builds, or with How to publish an iOS app from Windows for your first App Store upload.

Frequently Asked Questions

Can I connect from Windows to a Mac with Remote Desktop (RDP)?

macOS does not support Windows' RDP protocol; desktop access uses VNC (Screen Sharing). Installing a VNC client on Windows is all you need.

Which ports need to be open?

Port 22 for SSH and port 5900 for VNC. On a rented Mac both are open on delivery; if you need another port, tell us in a support ticket.

Is a VNC connection secure?

macOS screen sharing protects your login details, but the safest way is to use VNC inside an SSH tunnel, so all screen and keyboard traffic is encrypted.

Can I connect from a phone or tablet?

Yes. There are VNC and SSH apps for iOS and Android. Using Xcode on a small screen is hard, but it is handy for starting a build or checking status.