SSH: Difference between revisions

Jump to navigation Jump to search
10 bytes added ,  2 years ago
replace "userid" with "username" consistent with CCDB
(mention PS, cmd, and WSL options for Windows users)
(replace "userid" with "username" consistent with CCDB)
Line 10: Line 10:


<!--T:7-->
<!--T:7-->
To use any of these implementations of SSH successfully, you need to know (1) the name of the machine to which you want to connect, (2) your userid and (3) your password.  
To use any of these implementations of SSH successfully, you need to know (1) the name of the machine to which you want to connect, (2) your username and (3) your password.  


<!--T:5-->
<!--T:5-->
Line 16: Line 16:


<!--T:6-->
<!--T:6-->
Your <code>userid</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>userid</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 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.


<!--T:3-->
<!--T:3-->
When using Linux or macOS, you will need to open a terminal, for example /Applications/Utilities/Terminal.app for Apple hardware, and then use the command shown below:
When using Linux or macOS, you will need to open a terminal, for example /Applications/Utilities/Terminal.app for Apple hardware, and then use the command shown below:
{{Command|ssh -Y userid@machine_name}}
{{Command|ssh -Y username@machine_name}}
    
    
The option <tt>-Y</tt> forwards X11 traffic which allows you to use graphical applications on the remote server 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 first time that you connect to a remote server 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 server.  
The option <tt>-Y</tt> forwards X11 traffic which allows you to use graphical applications on the remote server 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 first time that you connect to a remote server 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 server.  


<!--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 I was assigned <tt>gra-login4</tt> when I typed <tt>ssh userid@graham.computecanada.ca</tt> but I want to be on <tt>gra-login2</tt>, I can simply type <tt>ssh gra-login2</tt> from <tt>gra-login4</tt> to get there.   
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 I was assigned <tt>gra-login4</tt> when I typed <tt>ssh username@graham.computecanada.ca</tt> but I want to be on <tt>gra-login2</tt>, I can simply type <tt>ssh gra-login2</tt> from <tt>gra-login4</tt> to get there.   


<!--T:4-->
<!--T:4-->
Bureaucrats, cc_docs_admin, cc_staff
2,773

edits

Navigation menu