Skip to content

Remote desktop client access via SSH

The EIDF Virtual Desktop Interface (VDI) provides a way of using EIDF VMs via SSH or remote desktop sessions run within your browser. On this page an alternative is described, using a remote desktop client running on your local host to connect to a remote desktop service running on your EIDF VM.

Using a remote desktop client can be both more usable and useful than the VDI for long periods of work. Remote desktop clients can offer a a sharper display than the VDI, better support for copying and pasting, and support for file sharing and other features that may not be available via the VDI.

Remote desktop client prerequisites

You can only access an EIDF VM via a remote desktop client if your project lead has granted you permission to access both the VM and the EIDF Gateway and the EIDF VM is running a remote desktop service, which a project lead can configure via the EIDF Portal.

Try the VDI first

It is strongly recommended that you, initially at least, try using EIDF VMs via remote desktop connections supported by the EIDF Virtual Desktop Interface (VDI) as the steps to access the remote desktop via the VDI are far more straightforward than those to use a remote desktop client.

Remote desktop client connection security

Interactions with the remote desktop client on your local host are securely forwarded, or 'tunnelled', via SSH, to the remote desktop service on your EIDF host, and vice-versa. All your interactions with the remote desktop, including keyboard and mouse clicks, the display state, clipboard contents and files (if drive redirection is enabled) are encrypted.


Set up SSH access to your EIDF VM and configure port forwarding

To connect to a remote desktop service running on your EIDF VM you need to both:

  1. Set up SSH access.
  2. Connect to the EIDF VM via SSH, forwarding ports from a custom port on your local host to the remote desktop service port, 3389, on your EIDF VM.

See SSH access to EIDF VMs for instructions on how to:

  • Set up SSH access.
  • Connect to an EIDF VM via SSH.
  • Access services on an EIDF VM via port forwarding and SSH tunnelling.
  • Write an SSH configuration file.
  • Specify port forwarding within the SSH configuration file.

Limitations of some remote desktop clients

Whilst some remote desktop clients support access to VMs via jump hosts, some clients to not support everything required to connect to an EIDF VM via the EIDF Gateway. For example, the Windows App for MacOS does not support connections via SSH keys. This is why accessing your EIDF VM via SSH, and configuring port forwarding, is also required.


Set your EIDF VM password

You will need to set a password for your EIDF VM, if you have not already done so. You can set (or reset) a password via the 'User Account Info' page in the EIDF Portal by following the instructions in Set or change the password for a user account.


Install a remote desktop client

Remmina is a remote desktop client for Linux. Under Ubuntu, Remmina can be installed by running:

sudo apt install -y remmina remmina-plugin-rdp remmina-plugin-secret

For other Linux flavours, see Remmina's How to install Remmina.

Windows provides a built-in remote desktop client, Remote Desktop Connection.

MacOS Windows App is a free remote desktop client. Despite its name, it can be used to connect to Linux VMs also.


Connect to the EIDF VM via SSH

You can connect to the EIDF VM via SSH and set up port forwarding to allow for a remote desktop client to connect to a remote desktop service running on the EIDF VM as follows.

If you are not using an SSH configuration file, then:

  • EITHER If your private key file has a custom name defined by you, then run:

    ssh -o ProxyCommand="ssh -i $HOME/.ssh/<key_file> -W %h:%p <user>@eidf-gateway.epcc.ed.ac.uk" -i $HOME/.ssh/<key_file> <user>@<host_ip> -L <local_port>:localhost:3389
    

    For example

    ssh -o ProxyCommand="ssh -i $HOME/.ssh/id_ed25519_eidf000 -W %h:%p some-eidf-user@eidf-gateway.epcc.ed.ac.uk" -i $HOME/.ssh/id_ed25519_eidf000 some-eidf-user@10.24.999.999 -L 23001:localhost:3389
    
  • OR If your private key file has a default OpenSSH name (e.g., id_ed25519 or id_rsa) then run:

    ssh -J <user>@eidf-gateway.epcc.ed.ac.uk <user>@<host_ip> -L <local_port>:localhost:3389
    

    For example:

    ssh -J some-eidf-user@eidf-gateway.epcc.ed.ac.uk some-eidf-user@10.24.999.999 -L 23001:localhost:3389
    

Alternatively, if you are using an SSH configuration file of the format described in SSH access to EIDF VMs i.e.:

Host eidf-gateway-<project_id>
    HostName eidf-gateway.epcc.ed.ac.uk
Host <host_name>
    HostName <host_ip>
    ProxyJump eidf-gateway-<project_id>
    LocalForward <local_port> localhost:3389
    ServerAliveInterval <interval_in_seconds>
Host eidf-gateway-<project_id> <host_name>
    User <user>
    IdentityFile ~/.ssh/<key_file>
    IdentitiesOnly yes

For example:

Host eidf-gateway-000
    HostName eidf-gateway.epcc.ed.ac.uk
Host eidf000-vm
    HostName 10.24.999.999
    ProxyJump eidf-gateway-000
    LocalForward 23001 localhost:3389
    ServerAliveInterval 60
Host eidf-gateway-000 eidf000-vm
    User some-eidf-user
    IdentityFile ~/.ssh/id_ed25519_eidf000
    IdentitiesOnly yes

then, run:

ssh <host_name>

For example:

ssh eidf000-vm

Connect to the EIDF VM remote desktop service via a remote desktop client

Having connected to the EIDF VM via SSH and set up port forwarding to the EIDF VM's remote desktop service, you are now ready to connect using a remote desktop client.

Though specific remote desktop clients vary, the following settings are common to many clients:

  • Remote desktop server host name and port. As port forwarding is being used from your local host, the host and port is localhost:<local_port> e.g., localhost:23001.
  • Protocol. 'RDP' or 'Remote Desktop'.
  • Memorable name for the connection. One option is to use a name including the EIDF VM <host_name> and the connection protocol e.g., eidf000-vm (SSH/RDP).
  • Username and password. Your EIDF VM username and password.

Caching usernames and passwords

It is recommend that initially you do not cache these values in a remote desktop client, but instead enter them when the connection is established, or, alternatively, that you select any 'Ask when required' option, if offered. This allows you to check that you can successfully set up a remote desktop session with your EIDF VM.

If caching passwords, you should check out the documentation for the remote desktop client you are using, to see how passwords are cached, and how securely.

Do not leave your remote desktop client session unattended

Once a remote desktop client has connected to the EIDF VM, you have access to your EIDF VM as though it was an application running on your local host. You should not leave your local host unlocked while connected to an EIDF VM as this risks both your local host and EIDF VM being accessed by unauthorised users!

Connect using Remmina on Linux

To run Remmina:

  1. Run:

    remmina
    
  2. The Remmina Remote Desktop Client will appear.

To connect to a remote desktop service in the Remmina Remote Desktop Client:

  1. Click + ('Add a new connection profile'), on the top-left of the client.
  2. A 'Remote Connection Profile' dialog will appear.
  3. Enter Name: enter a memorable name for the connection.
  4. Select Protocol: RDP - Remote Desktop Protocol.
  5. Enter Server: localhost:<local_port> e.g., localhost:23001
  6. Click Save and Connect.
  7. An 'Enter RDP authentication credentials' dialog will appear.
  8. Enter Username and Password: your EIDF VM username and password.
  9. Click OK.
  10. A window will appear with a remote desktop for your EIDF VM.

To reconnect to a remote desktop service in the Remmina Remote Desktop Client:

  1. Double-click on on the row for your remote desktop connection.
  2. An 'Enter RDP authentication credentials' dialog will appear.
  3. Enter Username and Password: your EIDF VM username and password.
  4. Click OK.
  5. A window will appear with a remote desktop for your EIDF VM.

To cache your username and, if desired, password in the Remmina Remote Desktop Client:

  1. Right-click on the row for your remote desktop connection, select Edit.
  2. The 'Remote Connection Profile' dialog will appear.
  3. Enter Username and Password: your EIDF VM username and password.
  4. Click Save and Connect.
  5. A window will appear with a remote desktop for your EIDF VM.

Connect using Remote Desktop Connection on Windows

To connect to a remote desktop service using Remote Desktop Connection:

  1. Click Windows Start or Search.
  2. Enter 'Remote Desktop Connection' or mstsc in the search field.
  3. Click Remote Desktop Connection when it appears.
  4. The 'Remote Desktop Connection' dialog will appear.
  5. Enter Computer: localhost:<local_port> e.g., localhost:23001
  6. Click Connect.
  7. A 'The identity of the remote computer cannot be verified. Do you want to connect anyway?' dialog will appear.
  8. Click Yes.
  9. A window will appear with a remote desktop for your EIDF VM.
  10. Log in using your EIDF VM username and password.

Connect using Windows App on MacOS

To connect to a remote desktop service using Windows app:

  1. Open the Windows App
  2. Click +, select Add PC.
  3. The 'Add PC' dialog will appear.
  4. Enter PC Namer: localhost:<local_port> e.g., localhost:23001
  5. Enter Friendly name: : enter a memorable name for the connection.
  6. Select Reconnect if the connection is dropped.
  7. Click Add.
  8. Double-click on on the row for your remote desktop connection.
  9. You will be prompted for your EIDF VM username and password.