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 or connect from your browser using Open Ondemand.
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
If you are connecting from outside the University network without eduVPN, you first need to connect to the ALICE ssh gateway.
If you are connecting from within the University network, you can directly connect to one of the login nodes.
If you are using eduVPN using a Leiden University ULCN account, you can directly connect to one of the login nodes.
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.nlwhere “<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>@login.alice.universiteitleiden.nlwhich will connect you to the first responding login node or if you need a specific login node
ssh <user-name>@login3.alice.universiteitleiden.nlor
ssh <user-name>@login4.alice.universiteitleiden.nland 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:
[<user-name>@nodelogin03 ~]$
# or
[<user-name>@nodelogin04 ~]$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.
ssh <user-name>@res-ssh-alg01.researchlumc.nlwhere “<user-name>” is your SHARK user name.
19 Jan 2026: Due to a high number of excessive login attempts on git.lumc.nl, access to GitLab/ssh jump server has been restricted for all external traffic. Use VPN or http://access.lumc.nl/.
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:
[<user-name>@res-ssh-alg01 ~]$Next, you need to connect to one of the login nodes.
ssh <user-name>@res-hpc-lo02.researchlumc.nlor
ssh <user-name>@res-hpc-lo04.researchlumc.nland 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:
[<user-name>@res-hpc-lo02 ~]$
# or
[<user-name>@res-hpc-lo02 ~]$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
Host alice
HostName login.alice.universiteitleiden.nl
User <user-name>
ServerAliveInterval 60
Host alice3
HostName login3.alice.universiteitleiden.nl
User <user-name>
ServerAliveInterval 60
Host alice4
HostName login3.alice.universiteitleiden.nl
User <user-name>
ServerAliveInterval 60where “<user-name>” is your ALICE user name.
After saving the file, you now have the aliases “alice”, alice1” or “alice2” available to connect to ALICE.
Without an ULCN account and eduVPN an extra line is required to connect via the gateway from outside the university network:
Host alice
HostName login.alice.universiteitleiden.nl
User <user-name>
ProxyJump <user-name>@ssh-gw.alice.universiteitleiden.nl:22
ServerAliveInterval 60SHARK
Host shark1
Hostname res-hpc-lo02.researchlumc.nl
User <user-name>
ProxyJump <user-name>@res-ssh-alg01.researchlumc.nl:22
ServerAliveInterval 60
Host shark2
Hostname res-hpc-lo04.researchlumc.nl
User <user-name>
ProxyJump <user-name>@res-ssh-alg01.researchlumc.nl:22
ServerAliveInterval 60where “<user-name>” is your SHARK user name.
After saving the file, you now have the aliases “shark1” or “shark2” available to connect toSHARK.
The “ProxyJump” entry is only necessary when you need to connect to from outside the LUMC to SHARK.
If you need both options, you can always add further entries with other “Host” aliases but without the ProxyJump command.
SSH terminal sessions have an automatic logout after 10 minutes of inactivity!
Need X11 forwarding?
If you often need X11 forwarding, you can add “ForwardX11 yes” to your ssh config for each “Host” setting. Then you do not always need to type “ssh -X …”.
Try to use one of the aliases to connect to the cluster:
ALICE
In the command line terminal, type in either
ssh aliceor
ssh alice1or
ssh alice2and 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
ssh shark1or
ssh shark2and 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: https://pubappslu.atlassian.net/wiki/spaces/HPCWIKI/pages/138182663
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.
Make sure that you use your public key, i.e., the file which ends in “.pub”. Do not copy your private key.
First, copy your public key to the ssh gateway:
ssh-copy-id -i ~/.ssh/id_rsa.pub <user-name>@ssh-gw.alice.universiteitleiden.nlwhere “<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:
ssh-copy-id -i ~/.ssh/id_rsa.pub alice1or
ssh-copy-id -i ~/.ssh/id_rsa.pub alice2and type in your ALICE user password for logging in to the login node.
You only have do this step for one of the login nodes because your home directory is available on all nodes.
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.
Make sure that you use your public key, i.e., the file which ends in “.pub”. Do not copy your private key.
First, copy your public key to the ssh gateway:
ssh-copy-id -i ~/.ssh/id_rsa.pub <user-name>@res-ssh-alg01.researchlumc.nlwhere “<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:
ssh-copy-id -i ~/.ssh/id_rsa.pub shark1or
ssh-copy-id -i ~/.ssh/id_rsa.pub shark2and type in your SHARK user password for logging in to the login node.
You only have do this step for one of the login nodes because your home directory is available on all nodes.
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
Host alicegw
HostName ssh-gw.alice.universiteitleiden.nl
User <user-name>
ServerAliveInterval 60
IdentityFile <path_to_key>
Host alice
HostName login.alice.universiteitleiden.nl
User <user-name>
ProxyJump alicegw:22
ServerAliveInterval 60
IdentityFile <path_to_key>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.
If you accessing ALICE from within the University network or you are using eduVPN (for users with a ULCN account), you do not need the first block, just the second one without the “ProxyJump” command.
SHARK
Host sharkgw
Hostname res-ssh-alg01.researchlumc.nl
User <user-name>
ServerAliveInterval 60
IdentityFile <path_to_key>
Host shark1
Hostname res-hpc-lo02.researchlumc.nl
User <user-name>
ProxyJump sharkgw:22
ServerAliveInterval 60
IdentityFile <path_to_key>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.
If you accessing SHARK from within the LUMC network, you do not need the first block, just the second one without the “ProxyJump” command.
Remote desktop with X2Go
With X2Go, you can get a remote desktop on SHARK. Instructions on how to set X2Go up, can be found here: https://pubappslu.atlassian.net/wiki/spaces/HPCWIKI/pages/37748998
Remote desktop with RDP
With RDP, you can get a remote desktop on ALICE. Instructions for how to set it up, can be found here: https://pubappslu.atlassian.net/wiki/spaces/HPCWIKI/pages/152731649
Open OnDemand web portal
You can also access ALICE and SHARK through their Open OnDemand portal. Instructions can be found here: https://pubappslu.atlassian.net/wiki/spaces/HPCWIKI/pages/37749098