Linux - Logging Into HPC with ssh
The objective of this tutorial is to show how to login to the HPC services that ARCC provides. Generally speaking all of our HPC services support login via ssh protocol and the focus of this page. We also provide links to other pages that are specific to different Operating Systems that users may have.
If you want Windows specific instructions please see our Windows - Logging into HPC with ssh & Clients tutorial.
If you want Mac specific instructions please see our Mac - Logging into HPC with ssh tutorial.
This is a comprehensive guide, feel free to use the Table of Contents below and jump to the sections that are relevant to your use case or current step in your workflow.
Contents
Expected Outcomes
By the end of this tutorial you will know what ssh protocol is and how to use it via a Unix/Linux terminal. Also you will know where to find instructions that are more specific to different operating systems (OS).
Introduction
When a user first gets an account to our HPC services they receive an automatically generated email from arcc-admin@uwyo.edu that includes a line similar to this:
“You will access the cluster via SSH using the command syntax ‘ssh arcc-t01@teton.arcc.uwyo.edu’ from a Linux/Unix/MacOS system.”
The Secure Shell Protocol (ssh) is a cryptographic network protocol for operating network services securely over an unsecured network. Typical applications include remote command-line, login, and remote command execution, but any network service can be secured with ssh. The ssh protocol provides a secure channel over an unsecured network by using a client–server architecture, connecting an ssh client application with an ssh server. The standard port for ssh is 22. It is generally used to access Unix-like operating systems, but it can also be used on Microsoft Windows. Windows 10 uses OpenSSH as its default ssh client and ssh server. The encryption used by ssh is intended to provide confidentiality and integrity of data over an unsecured network, such as the Internet. From Wikipedia.
Step-By-Step Tutorial
Opening a Terminal
Since ssh is typically a command line tool, we must first open a terminal on a Unix/Linux system to use it. There are multiple ways of doing this here are a few of them on a Unix/Linux system:
Use the keyboard shortcut of
ctrl+alt+T
Type the word ‘terminal’ in the system’s search box
Or simply use your mouse to click the terminal icon (if it is in your OS menu)
Using the ssh command
There are several different parts of the ssh command but it can be broken down into username
, the '@' symbol, and servername
. For example, when I first open a terminal on a Linux system I see:
johndoe@enterprise:~$
Where johndoe
is my username on my local system and the @enterprise
tells me the name of the system. The other parts indicate what directory I am currently in where the ~
symbol indicates that I am in my home directory and the $
symbol means I am logged in as a regular user on my local system. From here we can now type in our ssh command from the email:
johndoe@enterprise:~$ ssh arcc-t01@beartooth.arcc.uwyo.edu
Where this is saying that I want to ssh
as the user arcc-t01
onto the server @beartooth.arcc.uwyo.edu
. If we then hit ‘enter’ on the first time trying to connect we will get message saying the ‘authenticity of the host … can’t be established' and then asks if we ‘are sure we want to continue?’
There are some sensitive information was blacked out in the above image. If yours doesn’t look the exact same it is normal.
If we then type ‘yes’ we get taken to a pre-authentication window in our terminal where it says ‘this system requires two-factor authentication’ and that we will need to enter our password and second factor token to login.
If you are unsure how to do this, please see our Tutorial on Using Two-Factor Authentication. After we enter our password and 2FA, we are logged into the system successfully and our prompt in our terminal changes to what we used in our ssh command.
You won’t see any dots in the terminal window as you type your password. This is normal, please hit ‘enter’ after you finish typing your password & 2FA.
Where arcc-t01
is our username and @blog1
is the server we logged into. ‘blog1’ is specifically one of the login nodes on the cluster host teton.arcc.uwyo.edu
.
[arcc-t01@blog1 ~]$
Now you can use the the HPC system the way you expect provided this works with your intended workflow.
Enabling X11 Forwarding in ssh for Graphical Applications
To use graphical applications on the remote system you will need to enable X11 forwarding. To do this with ssh you can look up in the manual to see what flag you need to add by typing man ssh
. Looking at the options we can find we can use a capital 'X' flag -X
to enable X11 forwarding and a capital 'Y' flag -Y
for secure X11 forwarding. Which one to use is up to you, but in most cases -X
will be sufficient. See the example below:
Summary
In this tutorial we covered several topics:
What is ssh
How to open a Linux Terminal
How to use ssh in a Linux terminal
How to enable X11 with ssh for graphical applications
Next Steps
The next next steps could be varied depending on your workflow. Please see other tutorials for more on different topics.