Connecting to the RHPC cluster#
Get access and login to the servers#
You can get access to the system by sending an e-mail to the RHPC admins (rhpc-admin@nki.nl) after asking permission to Jonas Teuwen (send with Jonas in CC). They will then create an account for you on the server, set up a password and help you set up an authenticator app. You will need these to login to the server without an ssh connection.
Here are the commands to login to the server:
https://wiki.rhpc.nki.nl/wiki/index.php/Login_to_RHPC
If you do this, you will be prompted to provide several passwords. First, it’s the two factors for rhpc.nki.nl as described above. Then, the password is the concatenation of your set password and the 2FA code. So if your password is F00!b4r? and your 2fa code is 123 123, the password here would be F00!b4r?123123.
To connect to the servers with VPN#
To connect to the server with VPN you can follow the following steps:
1. Ask the rhpc-admin for a VPN certificate (rhpc-admin@nki.nl). You will receive a .conf file.
2. Download wireguard[https://www.wireguard.com/install/] and install it on your PC.
3. Click on ‘Import tunnel from file’ and add the .conf file
4. Activate the VPN
5. You can now access the server by using the address <servername>.rhpc.nki.nl
Important
Kosmos is the interactive login node for the cluster. After enabling the
WireGuard VPN connect with ssh kosmos and manage workloads from there.
All compute nodes (gaia, euctemon, herakles, etc.) must be accessed through
Slurm allocations—see Slurm usage guide for the
required commands. The old ProxyJump route via rhpc is no longer
available, so keep the VPN active for the full duration of your ssh session.
To connect to the servers with ssh#
If you are a windows user, install windows subsystem for linux (wsl) or ubuntu. If you are planning to use Pycharm remote deployment (very likely), then also set up the connection through Windows Powershell as explained below. Do not use the MobaXterm option, as this is more difficult to set up and offers less benefits like the direct ssh connection or connecting to the servers through Pycharm.
For this you need to create a shh key pair.
Ubuntu/WSL: Connect to rhpc#
Open shell
Generate ssh key pair with:
ssh-keygen -t rsa -b 4096 -C "USERNAME@rhpc.nki.nl"First prompt: Press enter to accept the default file location in which the public (id_rsa.pub) and private (id_rsa) key pair should be saved.
Second prompt: Enter a passphrase to encrypt your private key!
Type
ssh-addGo to the .ssh folder
cd ~/.sshType
cat id_rsa.pub→ Prints the public key to the shell, so you can easily copy it Ctrl+CSend the public key to the rhpc-admins so they can add it: rhpc-admin@nki.nl
You should now be able to connect to the rhpc server via ssh without a password after the rhpc admins add your ssh key to the cluster. Test this with command: ssh rhpc
Ubuntu/WSL/MacOS: Configure direct RHPC shortcuts#
Create an ssh config file in
~/.ssh/config, with the following information:
ControlMaster auto
ControlPath <your home folder on local machine>/.ssh/tmp/%h_%p_%r
Host rhpc
HostName rhpc.nki.nl
User <enter your RHPC username>
ServerAliveInterval 60
ForwardAgent yes
Compression yes
ForwardX11 yes
# Login node
Host kosmos
HostName kosmos
User <enter your RHPC username>
# CPU node
Host gaia
HostName gaia
User <enter your RHPC username>
# GPU/accelerator nodes
Host euctemon
HostName euctemon
User <enter your RHPC username>
Host eudoxus
HostName eudoxus
User <enter your RHPC username>
Host aristarchus
HostName aristarchus
User <enter your RHPC username>
Host galileo
HostName galileo
User <enter your RHPC username>
Host ptolemaeus
HostName ptolemaeus
User <enter your RHPC username>
Host herakles
HostName herakles
User <enter your RHPC username>
Host mariecurie
HostName mariecurie
User <enter your RHPC username>
Host alanturing
HostName alanturing
User <enter your RHPC username>
Host hamilton
HostName hamilton
User <enter your RHPC username>
Host carlos
HostName carlos
User <enter your RHPC username>
Host plato
HostName plato
User <enter your RHPC username>
Host schrodinger
HostName schrodinger
User <enter your RHPC username>
Host roentgen
HostName roentgen
User <enter your RHPC username>
Run
chmod 600 ~/.ssh/configto secure the file.Create a
~/.ssh/tmpfolder and give proper permissions (chmod 700).Also give proper permissions to your RSA key with
chmod 600 ~/.ssh/id_rsaandchmod 600 ~/.ssh/id_rsa.pub.
With the VPN connected you can now reach any machine directly, e.g. ssh kosmos or ssh galileo. PyCharm remote deployment keeps working with this configuration.
Connect to rhpc with Windows Powershell (necessary for PyCharm Remote Deployment):#
Make sure OpenSSH Client is in Apps & Features. If not, install it.
Run as administrator the Windows command prompt or Windows Powershell. Do not use Ubuntu or WSL. Windows cmd and WSL need to make separate ssh connections to the server. Pycharm remote deployment on Windows is only possible through the ssh connection made by the Windows cmd to the remote server.
Ideally, make sure that the folder C:Users\ *username*/.ssh/ is empty to avoid any conflicts. (rm * )
Type
ssh-keygenorssh-keygen -t rsa -b 4096 -C "USERNAME@rhpc.nki.nl"Press enter to save your ssh private and public ssh keys in folder C:Users\ *username*/.ssh/.
You’ll be asked to enter a passphrase. Hit Enter to skip this step.
The system will generate the key pair, and display the key fingerprint and a randomart image.
On your local windows machine, open WSL and navigate to /mnt/c/Users/username/.ssh (Not !! ~/.ssh as this is a different directory in WSL).
You should see two files. The identification is saved in the
id_rsa file and the public key is labeled id_rsa.pub. This is your SSH key pair.
To add the private ssh-key to the ssh agent in Windows Powershell:
By default the ssh-agent service is disabled. Allow it to be manually started for the next step to work.
# Make sure you’re running as an Administrator.
Get-Service ssh-agent | Set-Service -StartupType Manual# Start the service
Start-Service ssh-agent# This should return a status of Running
Get-Service ssh-agent# Now load your key files into ssh-agent
ssh-add C:\Users\username\.ssh\id_rsa(private key)
Print your public ssh key that you generated for the connection to the server with cat id_rsa.pub. Then copy the key.
Send the public key to the rhpc-admins so they can add it: rhpc-admin@nki.nl
You should now be able to connect to the rhpc server via ssh without a password after the rhpc admins add your ssh key to the cluster. Test this with command: ssh rhpc
Windows Powershell: Configure direct RHPC shortcuts#
Create a config file that contains:
Host rhpc User <username> HostName rhpc.nki.nl ServerAliveInterval 60 ForwardAgent yes Compression yes ForwardX11 yes # Login node Host kosmos User <username> HostName kosmos # CPU node Host gaia User <username> HostName gaia # GPU/accelerator nodes Host euctemon User <username> HostName euctemon Host eudoxus User <username> HostName eudoxus Host aristarchus User <username> HostName aristarchus Host galileo User <username> HostName galileo Host ptolemaeus User <username> HostName ptolemaeus Host herakles User <username> HostName herakles Host mariecurie User <username> HostName mariecurie Host alanturing User <username> HostName alanturing Host hamilton User <username> HostName hamilton Host carlos User <username> HostName carlos Host plato User <username> HostName plato Host schrodinger User <username> HostName schrodinger Host roentgen User <username> HostName roentgen
Save as
config(no extension) in theC:/Users/your_username/.sshdirectory.With the VPN active you can now connect directly, for example
ssh kosmos. PyCharm remote deployment works with this setup as well.
Not recommended: Option to manually add ssh keys to the rhpc server:#
This option does not allow jumping between servers without a password.
Connect to the rhpc server (not one of the machines like aristarchus) with:
ssh rhpc(if your wsl ssh connection is already set up) or alternatively withssh username@rhpc.nki.nland use your password and authenticator to loginGo to ~/.ssh/ on rhpc server
Create file
authorized_keyswith no extension (for example with nano authorized_keys ).Paste the public ssh key in the file. It appears as one line. Save the file.
Important! Change permissions for authorised keys: chmod 700 authorized_keys