Login to ALICE or SHARK from Linux

Overview

While access to ALICE or SHARK from Linux using the command line is the most common approach, you can also get a remote desktop on both clusters with X2Go

Command line access using ssh

For first time users or “the most basic way”

If you are connecting to ALICE or SHARK for the first time, the easiest way is to open a command line terminal and directly specify the name of the node that you try to connect to.

When connect to ALICE or SHARK for the first time on your device, ssh will always ask you to confirm the authenticity of the server that you try to connect to by typing in “yes” and hitting enter.

Afterwards ssh will ask you to type in the password for your user account. Hit enter when you have finished typing in your password.

For novice users:

When you type in your password, you will not see any characters appearing. It will seem as if the line is blank and you have typed nothing in. However, this is not the case. You will have typed in the password.

Here is a step-by-step guide for ALICE and SHARK:


ALICE

First, you need to connect to the ALICE ssh gateway.

Open a terminal, type in the following command to connect to the ALICE ssh gateway and hit enter:

ssh <user-name>@ssh-gw.alice.universiteitleiden.nl

where “<user-name>” is your ALICE user name.

If necessary confirm the authenticity of the gateway server and type in your password (see above).

After a successful login, you should see a welcome message from the ALICE gateway, your last login (if available) and your command line prompt should have changed to something like:

[<user-name>@sshgw ~]$

Next, you need to connect to one of the login nodes.

Type either

ssh <user-name>@login1.alice.universiteitleiden.nl

or

and hit enter to connect to either the first or second login node.

Again, confirm the authenticity if necessary and type in your password.

After a successful login, you should be greeted by the “ALICE News and Announcements” message and your prompt will have changed once more to:

You can logout by typing the command “logout” or using the keyboard shortcut CTRL+D


SHARK

If you are accessing SHARK from outside the LUMC, you need to connect to the LUMC ssh gateway first.

If you are working from inside the LUMC, you do not have to go through the LUMC ssh gateway first and you can directly connect to one of the login nodes.

Open a terminal, type in the following command to connect to the LUMC ssh gateway and hit enter.

where “<user-name>” is your SHARK user name.

If necessary confirm the authenticity of the gateway server and type in your password (see above).

After a successful login, your command line prompt should have changed to something like:

Next, you need to connect to one of the login nodes.

or

and hitting enter.

Again, confirm the authenticity if necessary and type in your password.

After a successful login, you should be greeted by message from SHARK and your prompt will have changed once more to:

You can logout by typing the command “logout” or using the keyboard shortcut CTRL+D


If your login user name from your Linux workstation is the same as the username on the HPC cluster, you do not need to specify “<user-name>@” before the server name, e.g., “ssh ssh-gw.alice.universiteitleiden.nl” or “ssh res-hpc-lo02.researchlumc.nl” would be sufficient.

For regular users or “the more elegant way”

You can make your life significantly easier for connection to ALICE or SHARK by editing the ssh config file in “~/.ssh/config".

Open the file in your favorite editor and type in


ALICE

where “<user-name>” is your ALICE user name.

After saving the file, you now have the aliases “alice1” or “alice2” available to connect to ALICE.


SHARK

where “<user-name>” is your SHARK user name.

After saving the file, you now have the aliases “shark1” or “shark2” available to connect toSHARK.


 

Try to use one of the aliases to connect to the cluster:


ALICE

In the command line terminal, type in either

or

and hit enter.

Type in your password for the gateway and login node when asked for.

After a successful login, you should be connected to one of the login nodes.


SHARK

In the command line terminal, type in either

or

and hit enter.

Type in your password for the gateway and login node when asked for.

After a successful login, you should be connected to one of the login nodes.


Making logins even more convenient with ssh keys

If you need to login to ALICE or SHARK frequently or if you use multiple connections at the same time, typing in your password every time can be avoided by using ssh keys. The procedure for setting up ssh keys is not very complicated and detailed below for both clusters.

But, first you need to create an ssh key. You can find instructions for generating ssh keys here:

Once you have generate a private and public key, you can upload your public key to ALICE or SHARK using the command ssh-copy-id:


ALICE

In the following, we assume that your public ssh key is located in ~/.ssh/id_rsa.pub on your local workstation. The file name can of course be different depending on the choice that you made when creating the key.

First, copy your public key to the ssh gateway:

where “<user-name>” is your ALICE user name. Type in your password when you are asked for it and confirm. This will put your public key in ~/.ssh/authorized_keys on the ssh gateway.

You can verify that it has worked by running ssh <user-name>@ssh-gw.alice.universiteitleiden.nl. You should be able to login without being asked for your ALICE user password. If it was successful, log out again.

Next, you can put your public key in your ~/.ssh/authorized_keys on ALICE. Assuming that you have set up your ssh config as explained in the previous section, you only need to run:

or

and type in your ALICE user password for logging in to the login node.

Verify that this step has worked by logging in to the login node (e.g., ssh alice1). If all was setup correctly, you should not have been asked for your password.


SHARK

In the following, we assume that your public ssh key is located in ~/.ssh/id_rsa.pub on your local workstation. The file name can of course be different depending on the choice that you made when creating the key.

First, copy your public key to the ssh gateway:

where “<user-name>” is your SHARK user name. Type in your password when you are asked for it and confirm. This will put your public key in ~/.ssh/authorized_keys on the ssh gateway.

You can verify that it has worked by running ssh <user-name>@ssh-gw.alice.universiteitleiden.nl. You should be able to login without being asked for your SHARK user password. If it was successful, log out again.

Next, you can put your public key in your ~/.ssh/authorized_keys on SHARK. Assuming that you have set up your ssh config as explained in the previous section, you only need to run:

or

and type in your SHARK user password for logging in to the login node.

Verify that this step has worked by logging in to the login node (e.g., ssh shark1). If all was setup correctly, you should not have been asked for your password.


Using ssh keys with custom names

If you are not using the default name for ssh keys, then the above steps will not work because ssh will only look for default key names. In order to make use of custom names, you need specify the key in your ssh configusing the setting IdentityFile. If you need to go through the ALICE or SHARK gateway first, then you need to set up two blocks in your ssh config. Here is an example:


ALICE

where “<user-name>” is your ALICE user name and “<path_to_key>” should be the path to your private key.

You can adjust the second block to use the second login node on ALICE.


SHARK

where “<user-name>” is your SHARK user name and “<path_to_key>” should be the path to your private key.

You can adjust the second block to use another login node on SHARK.


Remote desktop with X2Go

With X2Go, you can get a remote desktop on ALICE. Instructions on how to set X2Go up, can be found here: