Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

Table of Contents
minLevel1
maxLevel2

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.

Info

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:

Code Block
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:

Code Block
[<user-name>@sshgw ~]$

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

Type either

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

or

Code Block
ssh <user-name>@login2.alice.universiteitleiden.nl

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:

Code Block
[<user-name>@nodelogin01 ~]$
# or
[<user-name>@nodelogin02 ~]$

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

Status
titleCTRL+D


SHARK

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

Info

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.

Code Block
ssh <user-name>@res-ssh-alg01.researchlumc.nl

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:

Code Block
[<user-name>@res-ssh-alg01 ~]$

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

Code Block
ssh <user-name>@res-hpc-lo02.researchlumc.nl

or

Code Block
ssh <user-name>@res-hpc-lo04.researchlumc.nl

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:

Code Block
[<user-name>@res-hpc-lo02 ~]$
# or
[<user-name>@res-hpc-lo02 ~]$

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

Status
titleCTRL+D


Info

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

Code Block
Host alice1 
  HostName login1.alice.universiteitleiden.nl
  User <user-name>
  ProxyJump <user-name>@ssh-gw.alice.universiteitleiden.nl:22
  ServerAliveInterval 60
  
Host alice2
  HostName login2.alice.universiteitleiden.nl
  User <user-name>
  ProxyJump <user-name>@ssh-gw.alice.universiteitleiden.nl:22
  ServerAliveInterval 60

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

Code Block
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 60

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

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

Info

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.

Info

SSH terminal sessions have an automatic logout after 10 minutes of inactivity!


Info

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

Code Block
ssh alice1

or

Code Block
ssh alice2

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

Code Block
ssh shark1

or

Code Block
ssh shark2

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: SSH Keys

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.

Note

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:

Code Block
ssh-copy-id -i ~/.ssh/id_rsa.pub <user-name>@ssh-gw.alice.universiteitleiden.nl

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:

Code Block
ssh-copy-id -i ~/.ssh/id_rsa.pub alice1

or

Code Block
ssh-copy-id -i ~/.ssh/id_rsa.pub alice2

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

Info

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.

Note

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:

Code Block
ssh-copy-id -i ~/.ssh/id_rsa.pub <user-name>@res-ssh-alg01.researchlumc.nl

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:

Code Block
ssh-copy-id -i ~/.ssh/id_rsa.pub shark1

or

Code Block
ssh-copy-id -i ~/.ssh/id_rsa.pub shark2

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

Info

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

Code Block
Host alicegw 
  HostName ssh-gw.alice.universiteitleiden.nl
  User <user-name>
  ServerAliveInterval 60
  IdentityFile <path_to_key>
  
Host alice1 
  HostName login1.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.


SHARK

Code Block
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.

Info

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 ALICE. Instructions on how to set X2Go up, can be found here: Getting a remote desktop on ALICE or SHARK with X2Go