SSH: Difference between revisions

Jump to navigation Jump to search
no edit summary
(We publish host key fingerprints and not the host keys themselves.)
No edit summary
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
Secure Shell (SSH) is a widely-used standard to connect to remote machines in a secure way.  The entire SSH connection is encrypted - especially the login credentials (username and password). SSH is the normal way for Compute Canada users to connect in order to execute commands, submit jobs, follow the progress of these jobs and in some cases, transfer files.  
Secure Shell (SSH) is a widely used standard to connect to remote machines in a secure way.  The entire SSH connection is encrypted - especially the login credentials (username and password). SSH is the normal way for our users to connect in order to execute commands, submit jobs, follow the progress of these jobs and in some cases, transfer files.  


<!--T:2-->
<!--T:2-->
Various implementations of the SSH standard exist for most major operating systems.
Various implementations of the SSH standard exist for most major operating systems.
*On macOS and Linux the most widely used client is OpenSSH, a command line application installed by default on these platforms.
*On macOS and Linux, the most widely used client is OpenSSH, a command line application installed by default on these platforms.
*For recent versions of Windows, SSH is available in the PowerShell terminal, in the <code>cmd</code> prompt, or through Windows Subsystem for Linux (WSL).  There are also some 3rd-party SSH clients that are popular, such as [[Connecting with PuTTY|PuTTY]], [[Connecting with MobaXTerm|MobaXTerm]], [https://winscp.net/eng/download.php WinSCP], and [https://www.bitvise.com/ssh-client-download Bitvise].  
*For recent versions of Windows, SSH is available in the PowerShell terminal, in the <code>cmd</code> prompt, or through Windows Subsystem for Linux (WSL).  There are also some 3rd-party SSH clients that are popular, such as [[Connecting with PuTTY|PuTTY]], [[Connecting with MobaXTerm|MobaXTerm]], [https://winscp.net/eng/download.php WinSCP], and [https://www.bitvise.com/ssh-client-download Bitvise].  


Line 16: Line 16:


<!--T:6-->
<!--T:6-->
Your <code>username</code> is your Compute Canada '''default account''', typically something like <code>jsmith</code>, and the password is the same one you use to log in to the Compute Canada database, [https://ccdb.computecanada.ca/ ccdb.computecanada.ca]. The <code>username</code> is '''not''' your CCI, like <code>abc-123</code>, nor a CCRI like <code>abc-123-01</code>, nor your email address.
Your <code>username</code> is your '''default account''', typically something like <code>jsmith</code>, and the password is the same one you use to log in to the CCDB, [https://ccdb.computecanada.ca/ ccdb.computecanada.ca]. The <code>username</code> is '''not''' your CCI, like <code>abc-123</code>, nor a CCRI like <code>abc-123-01</code>, nor your email address.


<!--T:3-->
<!--T:3-->
Line 23: Line 23:


<!--T:15-->
<!--T:15-->
The first time that you connect to a remote machine you'll be asked to store a copy locally of its "host key", a unique identifier that allows the ssh client to verify, when connecting next time, that this is the same machine.  
The first time that you connect to a remote machine you'll be asked to store a copy locally of its "host key," a unique identifier that allows the SSH client to verify, when connecting next time, that this is the same machine.  
    
    
The option <tt>-Y</tt> shown above forwards X11 traffic which allows you to use graphical applications on the remote machine such as certain text editors. Note that to use graphical applications you also need to have an X11 server installed on your workstation. Under Linux an X11 server will normally already be installed, but users of macOS will typically need to install an external package such as such [https://www.xquartz.org XQuartz]. Under windows, MobaXterm comes with an X11 server, while for PuTTY users, there is [https://sourceforge.net/projects/vcxsrv/ VcXsrv].  
The option <code>-Y</code> shown above forwards X11 traffic which allows you to use graphical applications on the remote machine such as certain text editors. Note that to use graphical applications you also need to have an X11 server installed on your workstation. Under Linux an X11 server will normally already be installed, but users of macOS will typically need to install an external package such as such [https://www.xquartz.org XQuartz]. Under windows, MobaXterm comes with an X11 server, while for PuTTY users, there is [https://sourceforge.net/projects/vcxsrv/ VcXsrv].  


<!--T:8-->
<!--T:8-->
Note that when connecting via SSH to a Compute Canada cluster you will be randomly assigned to one of several distinct login nodes used for the cluster to balance the connection load, so that you may well land on a different login node from one connection to another, e.g. <tt>cedar1</tt>, <tt>cedar5</tt>, <tt>gra-login4</tt> or <tt>gra-login2</tt>. If you use a program like [https://www.gnu.org/software/screen/ screen] to manage your login sessions, you will need to make sure that you are on the same login node to open an older session, by making an SSH connection to the appropriate login node from whichever one you initially landed on. If for example you were assigned <tt>gra-login4</tt> when you typed <tt>ssh username@graham.computecanada.ca</tt> but you want to be on <tt>gra-login2</tt>, simply type <tt>ssh gra-login2</tt> from <tt>gra-login4</tt> to get there.   
Note that when connecting via SSH to one of our clusters you will be randomly assigned to one of several distinct login nodes used for the cluster to balance the connection load, so that you may well land on a different login node from one connection to another, e.g., <code>cedar1</code>, <code>cedar5</code>, <code>gra-login4</code> or <code>gra-login2</code>. If you use a program like [https://www.gnu.org/software/screen/ screen] to manage your login sessions, you will need to make sure that you are on the same login node to open an older session, by making an SSH connection to the appropriate login node from whichever one you initially landed on. If for example you were assigned <code>gra-login4</code> when you typed <code>ssh username@graham.computecanada.ca</code> but you want to be on <code>gra-login2</code>, simply type <code>ssh gra-login2</code> from <code>gra-login4</code> to get there.   


<!--T:4-->
<!--T:4-->
rsnt_translations
53,464

edits

Navigation menu