SSH login
This section will show you how to access our temporary remote cluster through SSH.
Why not use an RStudio server?
In our introduction to R, we used an RStudio server running on a remote cluster. In this course, we will log in a similar remote supercomputer using Secure Shell, then run R scripts from the command line.
Why are we not making use of the interactivity of R which is an interpreted language and why are we not using the added comfort of an IDE? The short answer is: resource efficiency.
Once you have developed your code in an interactive fashion in the IDE of your choice using small hardware resources on a sample of your data, running scripts allows you to only request large resources when you need them (i.e. when your code is running). This prevents heavy resources from sitting idle when not in use, as would happen in an interactive session while you type, think, etc. It will save you money on commercial clusters and waiting time on the Alliance clusters.
This course being about high-performance R, let’s learn to use it through scripts.
Remote connection to the cluster
Step 1: get the info
During the workshop, we will give you 3 pieces of information:
- a link to a list of usernames,
- the hostname for our temporary training cluster,
- the password to access that cluster.
Step 2: claim a username
Add your first name or a pseudo next to a free username on the list to claim it.
Your username is the name that was already on the list, NOT what you wrote next to it (which doesn’t matter at all and only serves at signalling that this username is now taken).
Your username will look like userxx
—xx
being 2 digits—with no space and no capital letter.
Step 3: run the ssh command
• Linux and macOS users
Linux users: open the terminal emulator of your choice.
macOS users: open “Terminal”.
Then type:
ssh userxx@hostname
and press Enter
.
- Replace
userxx
by your username (e.g.user09
). - Replace
hostname
by the hostname we will give you the day of the workshop.
When asked:
Are you sure you want to continue connecting (yes/no/[fingerprint])?
Answer: “yes”.
• Windows users
We suggest using the free version of MobaXterm. MobaXterm comes with a terminal emulator and a GUI interface for SSH sessions.
Here is how to log in with MobaXterm:
- open MobaXterm,
- click on “Session” (top left corner),
- click on “SSH” (top left corner),
- fill in the “Remote host *” box with the cluster hostname we gave you,
- tick the box “Specify username”,
- fill in the box with the username you selected (e.g.
user09
), - press “OK”,
- when asked
Are you sure you want to continue connecting (yes/no/[fingerprint])?
, answer: “yes”.
Here is a live demo.
Step 4: enter the password
When prompted, enter the password we gave you.
You will not see anything happen as you type the password. This is normal and it is working, so keep on typing the password.
This is called blind typing and is a Linux safety feature. It can be unsettling at first not to get any feed-back while typing as it really looks like it is not working. Type slowly and make sure not to make typos.
Then press Enter
.
You are now logged in and your prompt should look like the following (with your actual username):
[userxx@login1 ~]$
Troubleshooting
Problems logging in are almost always due to typos. If you cannot log in, retry slowly, entering your password carefully.