Login to cluster
From ALICE Documentation
Here you will find information on how to connect to ALICE from Linux, Windows or MacOS.
To login to the ALICE cluster, you need to perform a hop-like login sequence. The login nodes of the ALICE cluster cannot be accessed directly. You will need to first log in to an ssh gateway (or jumphost) and then you can connect to one of the login nodes. This login mechanism is required for everything that you want to do on ALICE. However, there are ways to simplify the process which are described below.
- 1 Best Practices
- 2 Login to ALICE from Linux
- 3 Login to ALICE from Windows
- 4 Login to ALICE from MAC OS
Know when you are on a login node. You can use your Linux prompt or the command
hostname. This will tell you the name of the login node that you are currently on. Note that the ssh gateway host itself is a secure portal from the outside and serves no compute function.
- Appropriate activities on the login nodes:
- Compile code, Developing applications,
- Defining and submitting your job,
- Post-processing and managing data,
- Monitoring running applications.
- Change your user password.
- Avoid computationally intensive activity on the login nodes.
- Don't run research applications. Use an interactive session if running a job is not appropriate.
- Don't launch too many simultaneous processes. While it is fine to compile on a login node, avoid using all of the resources. For example "make -j 14" will use half of the cores.
- That script you run to monitor job status several times a second should probably run every few minutes.
- I/O activity can slow the login node for everyone, like multiple copies or "ls -l" on directories with 000's of files.
- Hyperthreading is turned off. Running multiple threads per core is generally not productive. MKL is an exception to that if it is relevant to you.
Login to ALICE from Linux
SSH Gateway and login nodes
ALICE has its own ssh gateway which you have to go through first. You can only use to tunnel through to the actual login nodes. The gateway is named:
Important: For security reasons, the gateway allows only three consecutive login attempts from the current IP. If you enter the wrong login credentials three times, the IP that you used to connect to the gateway will be blocked for one hour. You will have to wait until the hour has passed before you can try to login again. If you do not remember your password, please contact the ALICE Helpdesk.
The login nodes are named:
login1.alice.universiteitleiden.nl (10.161.0.12) login2.alice.universiteitleiden.nl (10.162.0.13)
Setup ssh connection
Here, we describe how you can configure your ssh connection to connect to ALICE in the easiest possible way. We will use a feature called
ProxyJump in OpenSSH which is available in OpenSSH versions 7.3 and higher. If you have an older version of OpenSSH please have a look at SSH tunneling for older versions of OpenSSH. You can find out the version of OpenSSH by typing
ssh -V in your terminal.
In your Linux system open ~/.ssh/config in your favourite text editor (or create the file if it does not exist). Then add for instance
Host hpc1 HostName login1.alice.universiteitleiden.nl User <USERNAME> ProxyJump <USERNAME>@ssh-gw.alice.universiteitleiden.nl:22 ServerAliveInterval 60 Host hpc2 HostName login2.alice.universiteitleiden.nl User <USERNAME> ProxyJump <USERNAME>@ssh-gw.alice.universiteitleiden.nl:22 ServerAliveInterval 60
(Replace <USERNAME> by your own ULCN account name.)
Add monitoring tools
If you want to look at the monitoring tools that are running on the management node too, you could add additional tunnelling commands to the config for a specific host. Do not add tunnels to all definitions as they may produce conflicts when you use the same tunnel twice. So add the tunnel commands, for instance, to one host like:
Host hpc1tunnel HostName login1.alice.universiteitleiden.nl User <USERNAME> ProxyJump <USERNAME>@ssh-gw.alice.universiteitleiden.nl:22 ServerAliveInterval 60 LocalForward 8081 management.alice.universiteitleiden.nl:8081 LocalForward 8080 management.alice.universiteitleiden.nl:443
SSH tunneling for older versions of OpenSSH
Alternatively, if your OpenSSH server isn't that recent (version 7.2 or earlier) and doesn't recognize the ProxyJump alias, try this:
Host hpc1 HostName login1.alice.universiteitleiden.nl User <USERNAME> ProxyCommand ssh -X <USERNAME>@ssh-gw.alice.universiteitleiden.nl -W %h:%p
Adding X11 fowarding
You can even set your ssh connection to automatic X11 forwarding by adding the following setting:
Direct login to login nodes
If you completed the above steps you should be able to login to one of the login nodes by simply typing this:
You will be asked to provide your ALICE user password twice (not your ULCN or LUMC password), once for the ssh gateway and once of the login node. If you do this for the first time, you will also be asked to confirm the identity of the ssh gateway and the login node.
Password-less login using SSH keys
If you do not wish to enter you password everytime you login you can use ssh keys. If you have not yet used ssh keys before, please have a look at this page: Public key authentication from Linux
If you have an ssh key, you need to deposite it first on the ssh gateway and then on the login node. You can use
ssh-copy-id to copy your public key from your local machine to the ssh gateway, e.g.,
ssh-copy-id -i ~/.ssh/id_rsa.pub <USERNAME>@ssh-gw.alice.universiteitleiden.nl
(use your ALICE password for this). This will put your public key in ~/.ssh/authorized_keys on the ssh gateway. Then login to the ssh gateway (
ssh <USERNAME>@ssh-gw.alice.universiteitleiden.nl) to test it. If it works log out again and use ssh-copy-id to deposite the key on a login node using the ssh tunnel defined above.
ssh-copy-id -i ~/.ssh/id_rsa.pub hpc1
This will put your public key in
~/.ssh/authorized_keys in your HOME directory on the login node. Verify that this step has worked by logging in to the login node (
ssh hpc1). It is sufficient to do this for only one login node. You will also be able to login to the other login node without entering your password now.
If all was setup correctly, you should be logged in to one of the login nodes without typing your password.
Accessing monitoring tools
Having set up the ssh tunneling required to access the monitoring tools on the cluster you are now able to access port 443 (general secure web server on the management node) and port 8081 (specific port in use by the Bright Cluster Manager monitoring tools).
So in a browser, you could type:
to gain access to the management main web server, or you could type:
to gain access to the Bright Cluster Manager User Portal.
Login to ALICE from Windows
There are multiple ways to connect to ALICE from Windows. Below a list in order of complexity using:
Login to ALICE from MAC OS
Logging in with a Mac requires no extra installation on your local machine.
- Under “File”, open a new finder window. Navigate to the “Applications” folder, then the “Utilities” folder. Open a terminal window.
- Edit your ~/.bash_profile to incorporate:
export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8
- Open a new tab to make sure these settings are in effect (Shell -> New Tab).
- Edit your ~/.ssh/config file and put in:
Host hpc1 HostName login1.alice.universiteitleiden.nl User <USERNAME> ProxyJump <USERNAME>@ssh-gw.alice.universiteitleiden.nl:22 ServerAliveInterval 60
(Replace <USERNAME> by your own ULCN account name.)
Now you can login to the ALICE login 1 node by typing on the command line:
All other settings (e.g., for password-less login) are similar to the Linux login setup