connecting with a mac

Instructions for connecting to BMI resources or your office desktop computer from a macOS laptop or desktop. The instructions will vary depending on what you are trying to connect to, and whether you need a Graphical or Command Line interface. Information on the software mentioned here can be found on the Getting Started page.

Microsoft Remote Desktop Application Icon

GUI to a Windows system

Microsoft Remote Desktop Servers list of servers and list of applications available on the servers.

General Windows Application Servers:

  1. # inactive
  2. # inactive

Statistical Applications Servers:


You will use the Microsoft Remote Desktop app to connect to Windows systems from a Mac
Edit connection config - empty

  1. Open the Windows Remote Desktop application
  2. Click the + symbol to create a new saved session
  3. Enter the hostname of your destination into the ‘Connection name’ and ‘PC name’ fields
  4. Leave the ‘Credentials’ fields blank
  5. optional – Uncheck ‘Start session in full screen’
  6. Uncheck ‘Use all monitors’
  7. Close this ‘Edit Remote Desktops’ window, and connect by double clicking on one of the newly created session listed under My Desktops
  8. Enter your username and password when prompted. ( This will be your Windows domain account credentials, and does not require a specified domain name before the username. This may be the same as your unix account credentials )
Edit connection config - empty
Edit connection config - empty

Cyberduck Connect using GUI for sftp.

Edit connection config - empty

Edit connection config - empty

Terminal Application Icon

Command Line Only

To a Linux system

  1. ssh -Y -l username
  2. ssh -Y -l username
  3. ssh -Y -l username
  4. ssh -Y -l username
  5. $ xterm

xQuartz X11 Application Icon

With a GUI

vnc:// using an application called Screen Sharing

Screen Sharing Application Icon

To an Apple system

  1. Screen Sharing
  2. XQuartz
  3. Screens
  4. NoMachine

NoMachine Application Icon

To a Linux system

To connect to a Linux desktop or server with a GUI:

    1. NoMachine

NoMachine Client download page.

  1. Protocol: SSH, Host:, Use the system login, Authentication method: Password, Don’t use a proxy, Done
  2. XQuartz


Test X11, XQuartz

  1. Open Terminal and type at the prompt xclock to confirm x11 XQuartz is working locally.
  2. Then try ssh -Y -l username
  3. and when connected type $ xterm If this works then XQuartz is working correctly.
  4. if the last test failed, it may be necessary to reinstall XQuartz. This is especially true after some macOS updates. The file changes are listed below.
  5. /etc/ssh/ssh_config
  6. User ssh config file gives a per host, per user overrides in file ~/.ssh/conf some examples below. reference. This conf file assumes X11 installed through macPorts.

    Host *
    XAuthLocation /opt/X11/bin/xauth
    #ServerAliveInterval 60
    #ServerAliveCountMax 3
    #TCPKeepAlive yes
    #ForwardX11Timeout 596h
    #UseKeychain yes
    #ForwardX11Trusted yes

    # XAuthLocation added by XQuartz (
    Host *
    XAuthLocation /opt/X11/bin/xauth
  7. /etc/ssh/sshd_config

    AuthorizedKeysFile .ssh/authorized_keys
    UsePAM yes
    AcceptEnv LANG LC_*
    Subsystem sftp /usr/libexec/sftp-server
    XAuthLocation /opt/X11/bin/xauth
    # make the next two changes if you want to ssh to your machine and run x apps. most users do not need to make the following changes.
    #X11Forwarding yes
    #X11DisplayOffset 10
  8. User ssh config file, per host adjustment overrides in file ~/.ssh/config some examples below. reference.

    Host *
    XAuthLocation /opt/X11/bin/xauth
    #ForwardX11Trusted yes
    #UseKeychain yes
    #ServerAliveInterval 60
    #ServerAliveCountMax 30
    #User username
    #TCPKeepAlive yes
    #Port 22
    #Protocol 2
    #ForwardX11 no
    #ForwardAgent no
    #AddKeysToAgent yes

    IdentityFile ~/.ssh/id_rsa
    UseKeychain yes
  9. ssh manual page
  10. ssh_config manual page
  11. ssh-agent manual page
  12. sshd_config manual page

To a Mac system

Mac systems support SSH connections similar to Linux, so you will use the same procedure detailed above for command line only connections to a Linux system.

Edit connection config - empty

Mounting a home directory

To connect to your biostat home directory with a GUI:

  1. SMB smb://</code> mounting a biostat home directory with an SMB connection. This only works with a wired desktop machine. Laptops need an alternate solution.
  2. sshfs requires a local directory to act as a mount point such as /Users/username/mount/homedir. Then, with a staticVPN connection, use a command similar to the following: sshfs -o auto_cache /Users/username/mount/homedir uses ssh to mount a file system using FUSE
  3. another example /Users/username/mount/homedir. Then, with a staticVPN connection, use a command similar to the following:
    # sshfs user@host:/dir /tmp/ssh -o auto_cache -ovolname=ssh
    # verify a directory exists such as /Users/username/mount/sdac and with an active staticVPN connection use a command like:
    sshfs /Users/username/mount/sdac -o auto_cache -o volname=sdac
    uses ssh to mount a file system using FUSE
  4. Note: software required includes OSXFUSE and sshfs. OSXFUSE has a system preference. Updates to FUSE are done there.

    $ sshfs --version
    SSHFS version 2.5 (OSXFUSE SSHFS 2.5.0)
    OSXFUSE 3.10.4
    FUSE library version: 2.9.7
  5. Note: going from linux to mac, use the command fusermount


With a Poor Internet Connection

If you are trying to connect from an environment with a poor internet connection (e.g. hotel wifi or slower DSL), you may wish to use more bandwidth tolerant methods.

limited network usage strategies

Terminal connections will work on slow connections. A GUI such as NoMachine may also help.

  1. Terminal
  2. NoMachine
  3. Connect to your desktop machine, and issue commands from there.

Applications on macOS are located in
( searched left to right, first found wins, so MacPorts, /opt… packages
can override the default applications in /bin… )

Posted in KB