Secure Shell
Secure Shell (SSH) is the standard way of connecting to Linux/Unix based system. A summary knowledge of the various possibilities of ssh will allow you to be more efficient connecting to AOS Linux, and Compute Canada/Calcul Quebec servers. In the past Microsoft Windows required the use of third party software like putty for ssh connections. This is no longer true (as from 2019), and cmd, or PowerShell on Windows now have ssh capabilities.
Generic ssh
The most basic usage of ssh will allow for a generic terminal onto an external machine.
Template | Example |
---|---|
|
|
will open a terminal (usually bash, but depends on your session settings) onto "machine_name". You can also specify your login name in the command:
With a login name
You can also specify your login name directly in the command, so that you don't have to type it each time. If you'd also like not to have to type your password every time, please see the Ssh Keys section
Template | Example |
---|---|
|
|
|
|
Ssh Keys (Recommended)
To set up keys and use them for more secure communication please refer to: Use SSH keys
With X forwarding
X forwarding allows the opening of Graphical User Interface Programs (GUI) through ssh. This is notoriously slow, and no longer recommended. However it is quite useful in a pinch. Linux users can use this out-of-the-box. Windows users need to install an X-server ([Xming], or use an ssh client that includes one [mobaXterm]. Mac Users need to install XQuartz from the App store before they can use this.
OS | Template | Example |
---|---|---|
Windows/Linux | ssh -X "login_name"@"machine_name" | |
Mac | ssh -Y "login_name"@"machine_name" |
You can also add the '-C' option for Compression, but this rarely helps if you have a good internet connection.
With Tunelling
Tunnelling allows the use of a gateway computer to connect two computers that cannot connect directly. You can leverage this to use a remote port of an AOS server, mapping it onto your own computer/laptop. Then connecting to that port on your laptop will connect to the AOS server directly. Typical use cases in AOS is with jupyter and IPython notebooks.
Template | Example | In english |
---|---|---|
|
| Forward the port 8888 on bumblebee to the port 8888 on my computer, by passing through the jump.meteo.mcgill.ca gateway. This is useful if e.g. jupyter is running on port 8888 on bumblebee, and I want to access it through localhost:8888 on by computer. |
|
| Forward the port 5555 on jazz to the port 5555 on my computer, by passing through the zephyr.meteo.mcgill.ca gateway. This is useful if e.g. jupyter is running on port 5555 on jazz, and I want to access it through localhost:5555 on by computer. |