Remote Connection via VSCode#

Moving your algorithms (code) to execute close to the data you are processing (while minimizing data movement) is a key part of scalable data processing. To allow code and algorithms that are on your local computer to be executed on GeoAnalytics Canada, you can setup your locally installed Visual Studio Code (VSCode) to leverage SSH connections. This will enable you to execute on your GeoAnaltytics Canada Remote Desktop using an SSH tunnel thereby granting you access to all of GeoAnalytics Canada’s processing infrastructure through a local IDE. This tutorial will go over how to use VSCode (open source) to connect to our Remote Desktops.


- VSCode installed on your machine
- A Running Remote Desktop environment

VSCode “Remote - SSH” Extension#

In your VSCode Editor, you will need to install the extention:

Once installed, you will have a green icon in the bottom left of your Editor window:

Remote Connection Icon

Configuring SSH Connection#

After clicking the green icon, you will be presented with a list of remote connection options:

Remote Connection SSH List

From here we can connect directly to the Remote Desktop the same way you would connect passing in the destination via SSH terminal commands:

- username@IPAddress

Make sure you only enter “username@IPAddress” since it is already done through the same SSH protocol as the terminal.

Configure SSH Config File#

If you have not already, you can configure your SSH config file to automatically connect. The .ssh/config file would look something like the following:

Host geoanalytics-remote-desktop
   HostName "Your IP Address for the Remote Desktop"
   User "username"

If you have SSH keys configured for your Remote Desktop session, you may want to point the configuration to the Identity File. Also, an SSH connection will need X11 Forwarding enabled to allow for a Remote Desktop client like X2Go. Your configuration file will look something like this:

Host geoanalytics-remote-desktop
   HostName "Your IP Address for the Remote Desktop"
   User "username"
   IdentityFile ~/.ssh/geoanalytics-remote-desktop
   ForwardAgent yes
   ForwardX11 yes
   ForwardX11Trusted yes

If configured, then when you click “Connect to Host…”, your target Host will be in the drop down list.

When connected, you will be able to mount to a directory in your VSCode Explorer, run a terminal, and start developing remotely!

[ ]: