Skip to end of metadata
Go to start of metadata

This article explains the process of enabling ssh and VNC access on a macOS device, and accessing the computer from a Windows computer

Configuring the macOS device for Remote Access

Set up Remote Login (ssh) on your Mac

  1. On your Mac, choose Apple menu  > System Preferences, click Sharing, then select Remote Login.

  2. Select the Remote Login checkbox.

  3. Specify which users can log in:

    • Only these users: Click the Add button , then choose who can log in remotely. Users & Groups includes all the users of your Mac. Network Users and Network Groups include people on your network.

Turn on screen sharing (VNC) on your Mac

  1. On your Mac, choose Apple menu  > System Preferences, then click Sharing.

  2. If Remote Management is selected, deselect it.

    • You can’t have both Screen Sharing and Remote Management on at the same time.

  3. Select the Screen Sharing checkbox.

  4. To specify who can share your screen, select:

    • Only these users: Screen sharing is restricted to specific users.

      • click the Add button  at the bottom of the users list, then do one of the following:

        • Select a user from Users & Groups, which includes all the users of your Mac except sharing-only users and guest users.

        • Select a user from Network Users or Network Groups, which includes users and groups with network server accounts. Network users and members of network groups can use their network name and password to connect to your Mac for screen sharing.

  5. Click Computer Settings, then select the following:

    • VNC viewers may control screen with password: Other users can share your screen using a VNC viewer app—on iPad or a Windows PC, for example—by entering the password you specify here. If you select this option, you should create a very secure password.

      • This is required to be able to connect via TightVNC or RealVNC on a Windows device

Setting Up VNC Connection on Windows

Setting Up PuTTY

If you want to know how to tunnel VNC through SSH, it’s recommended you use PuTTY to make the connection to your SSH server.

PuTTY offers a graphical user interface that can easily be configured to allow you to tunnel other software, like your VNC viewer, over the connection.

  1. To start, download PuTTY and open the client. 
  2. The main Session menu allows you to type your macOS computer's hostname (i.e. ENG-ANC123456D). Type your SSH server address in the Host Name (or IP Address) text box. If your SSH port is different from the standard port 22, type this in the Port box. 
  3. You’ll also want to save this session, so in the Saved Sessions text box, add a suitable name for your SSH connection, then click the Save button.
  4. In the left-hand menu, expand the Connection tab, then do the same for the SSH. Click on Tunnels.
  5. In the Port forwarding section of the Tunnels menu, you’ll be providing the details to allow PuTTY to tunnel your VNC connection over SSH. In the Source port text box, type 5900. In the Destination text box, type your remote address:5900, using the hostname of the remote desktop PC or server. For instance, would be suitable. (IP address may be used instead of hostname, but the hostname is preferred because the IP may change)
  6. Return to the Session section, click on your saved session name under Saved Sessions, then click Save to save your settings.
  7. With your PuTTY settings ready, make the SSH connection by clicking Open at the bottom. You’ll be required to insert the username and password required to make your SSH connection as PuTTY makes the attempt.
  8. Once the login process is complete, you’ll be given access to the SSH terminal window for your remote desktop.

With the SSH tunnel to your remote desktop server active, you’ll now be able to make a VNC connection. You can use any VNC client you choose, but this guide will run through how to connect using TightVNC, a popular and free VNC client for Windows and Linux.

You can minimize PuTTY while the connection is active.

Connecting Using TightVNC

If your SSH connection is active, connecting using TightVNC is pretty simple. This assumes that your VNC server is running on your remote PC or server.

  1. Open TightVNC to begin. In the Connection section, type localhost::5900 or into the Remote Host text box. PuTTY is monitoring this port and will automatically forward this connection, when the attempt is made, to your remote server. 
  2. You can configure your VNC connection further by clicking Options but, if you’re ready to connect, click Connect. 
  3. You’ll be asked for your VNC server password (the password you set above in the Setup Remote Login setps), so provide this in the VNC Authentication pop-up window, then click OK.

If your SSH connection is working correctly, TightVNC should load your remote VNC desktop window, ready for you to use.