Remote access with macOS

Remote control other desktops.

How to establish a connection from your computer to a remote computer.

macOS to Windows

To access a Windows system from your Mac, we use the Microsoft Remote Desktop Client.

Download the Microsoft Remote Desktop client from the Mac App Store.


The remote Windows system must be configured to accept remote connections from your user account.

Please contact one of your responsible Windows group administrators. They will give your user acount permissions on that computer to remote connect. 

Note: You can't connect to a PC that's asleep or hibernating.

Internal network


After the installation you can find the application "Microsoft Remote Desktop" in the "Application" folder. When you execute it you will see a window in which you can enter the computer name you want to connect to (figure 1).

After installation click on the Plus ("New") and enter the following data (e.g. connect to winterm):

  • Connection name: winterm
  • PC name: winterm
  • Gateway: No gateway configured
  • Username: win\accountname
  • The password field may be left blank, in that case you will be asked during the session start for entering your password.

In addition you can change some optional settings like the resolution etc. if you want to. If you want to access a local folder during the session to the terminal server, you may add the needed folder via the Tab "Redirection".

VPN connection

From outside the DESY network, you first need a VPN connection to the DESY internal network.

VPN instructions here.

When the VPN connection is established, follow the instructions for the internal network described above.

SSH tunnel

To access a DESY Windows system from macOS over SSH you need the Microsoft Remote Desktop Client and a SSH tunnel.

Note: The target computer is specified at the ssh connection and not at the remote desktop connection!

Establish the SSH Tunnel

  1. Open a Console / Terminal
  2. Establish the SSH Tunnel using the following command with your username:
    ssh -L -lusername

Establish the Remote Desktop Session

Create a new Desktop Connection in Microsoft Remote Desktop:

  • PC name: localhost:8006
  • Gateway: No gateway configured

Note: The local port 8006 is only an example. You may chose another one between 5000 and 65535 for yourself. Furthermore you may chose another Windows computer you like instead of using as destination host.

macOS to macOS over SSH

To access a Mac from another Mac via SSH, use the Terminal and Screen Sharing applications built into macOS.


Screen sharing must be enabled on the target Mac.

To turn Mac screen sharing on.

Establish the SSH Tunnel

  1. Open Terminal
  2. Enter the following command with your username and your target Mac address:
    ssh -L

Open Screen Sharing

In another terminal window, on your local machine, open Screen Sharing by passing an open command with a VNC URL:

  1. Open new Terminal window.
  2. Enter the following command 
    open 'vnc://localhost:8006'

Screen Sharing should open and ask you for credentials for the remote machine.


  • The local port 8006 is only an example. You may chose another one between 5000 and 65535 for yourself.
  • Replace with your destination host. E.g.
  • Learn more

macOS to Linux (SSH and X Forwarding)

To display remote applications on Mac OS which need a X server the SSH command with the option -X is recommended.


ssh -X -l [account name]


NOTE: You have to login to first when your Mac is not connected to the DESY intranet. Only from bastion you are able to connect to other DESY Linux systems because this server acts as a gateway for the internal DESY network. More information about bastion you can find on

Linux to macOS

To complete these instructions you need the following

  • The hostname of your Mac System
  • The command 'vncviewer' (included in the package 'tigervnc') on your Linux system
  1. Configuring Mac OS
    • In the System Preferences at the category 'Internet & Wireless' choose the menu item Sharing .
    • Activate the check box Screen Sharing and click on the button Computer Settings...
    • In the next window please activate the check box VNC viewers may (...) and enter a password in the text field which is used to connect to the Mac remotely.
    • After this please enter the password of the main user (Administrator) in the text field of the next pop-up window to confirm the changes and click OK.
    • When you concluded the changes please close the window.
  2. Create the remote connection from a Linux (SLD) PC to a Mac
    • Get a command line from the K Menu: Menu item Run Command... or use the key combination Alt+F2.
    • On the command line please enter the command vncviewer -FullColour [host name] and confirm with a click on the OK button.
    • In the pop-up window please enter the computer name and in the next window the password which you have chosen for the remote access connection and confirm with OK.