Skip to content

SSH

Introduction

HPC clusters that are most commonly operated via a Command Line Interface (CLI).

Such a CLI can be accessed directly by attaching a monitor and keyboard to the cluster itself locally to create an operational "terminal", however it is more common to operate HPC clusters remotely over the (inter)network through Secure SHell (SSH) using Terminal Emulators, as HPC clusters are usually geographically inconveniently located for their users.

GNU/Linux and MacOS systems are usually equipped with powerful SSH tools by default out of the box. Microsoft Windows users can install openSSH on windows 1, or install third-party software, e.g.:

Required Software

For Windows you likely need a 3rd party tool to be able to use SSH. More modern versions of Windows may include SSH by default, for more information see :simple-powershell: PowerShell.

Download and install the free version of MobaXterm.

Download (version 0.81 or newer) and install from PuTTY from the MSI ("Windows Installer") section.

GUI applications/X11 forwarding

If you need to load X11/GUI applications from the terminal, please consider installing VcXsrv as well! Or even simpler and better: use the Web Interface

SSH should be available by default for most Windows 11 installations. For windows 10 or manual installation please check the official Microsoft documentation on how to install SSH for Windows.

Info

You'll only need to install the "OpenSSH Client". Please don't install the "OpenSSH Server" if you don't know what you're doing!

GUI applications/X11 forwarding

If you need to load X11/GUI applications from the terminal, please consider installing VcXsrv as well!

Available by default, no action required!
apt install openssh-client
apt install openssh-client
dnf install openssh
pacman -S openssh
Available by default, no action required!
brew install openssh

Logging in

img_7.png

Open MobaXterm.

  1. Click on Session (in top left menu)
  2. Select SSH within the "Session Settings" popup
  3. Fill in the Remote host: hpc.tue.nl
  4. Enter your TU/e login name
  5. Click on Ok to add the session and connect

img_8.png

Open PuTTY.

  1. Enter the "Host Name (or IP address)" field USERNAME@hpc.tue.nl
  2. Click on Open to connect to the server
> ssh USERNAME@hpc.tue.nl
USERNAME@hpc.tue.nl's password:

       _____ _   _  __                                ╮╭
      |_   _| | | |/ /__                         ▄██████████▄
        | | | |_| / / -_)                     ▄████████████████▄
        |_|  \___/_/\___|                   ▄████████████████████▄
                                          ▄██████████████████████▄
 Eindhoven University of Technology       ▐▀▀▀▀███▀▀▀▀██▀▀▀▀███▀▀▀▀▌
------------------------------------                  ▐▌
                                                      ▐▌  
Welcome to the TU/e HPC Umbrella login node           ▐▌  
                                                       █▄█▀
For WIKI information on how to use this cluster go to:
https://hpcwiki.tue.nl/

--------------------------------------------------------------------
 Data (incl. home directories) in the HPC Cluster is NOT backed up!

     The HPC Cluster is not a solution for archiving your work!
--------------------------------------------------------------------

[username@tue-login002 ~]$
$ ssh USERNAME@hpc.tue.nl
USERNAME@hpc.tue.nl's password:

       _____ _   _  __                                ╮╭
      |_   _| | | |/ /__                         ▄██████████▄
        | | | |_| / / -_)                     ▄████████████████▄
        |_|  \___/_/\___|                   ▄████████████████████▄
                                           ▄██████████████████████▄
 Eindhoven University of Technology       ▐▀▀▀▀███▀▀▀▀██▀▀▀▀███▀▀▀▀▌
------------------------------------                  ▐▌
                                                      ▐▌  ▄
Welcome to the TU/e HPC Umbrella login node           ▐▌                                                         █▄█▀
For WIKI information on how to use this cluster go to:
https://hpcwiki.tue.nl/

--------------------------------------------------------------------
 Data (incl. home directories) in the HPC Cluster is NOT backed up!

     The HPC Cluster is not a solution for archiving your work!
--------------------------------------------------------------------

[username@tue-login002 ~]$
$ ssh USERNAME@hpc.tue.nl
USERNAME@hpc.tue.nl's password:

       _____ _   _  __                                ╮╭
      |_   _| | | |/ /__                         ▄██████████▄
        | | | |_| / / -_)                     ▄████████████████▄
        |_|  \___/_/\___|                   ▄████████████████████▄
                                           ▄██████████████████████▄
 Eindhoven University of Technology       ▐▀▀▀▀███▀▀▀▀██▀▀▀▀███▀▀▀▀▌
------------------------------------                  ▐▌
                                                      ▐▌  ▄
Welcome to the TU/e HPC Umbrella login node           ▐▌                                                         █▄█▀
For WIKI information on how to use this cluster go to:
https://hpcwiki.tue.nl/

--------------------------------------------------------------------
 Data (incl. home directories) in the HPC Cluster is NOT backed up!

     The HPC Cluster is not a solution for archiving your work!
--------------------------------------------------------------------

[username@tue-login002 ~]$

Info

The USERNAME is equal to your TU/e network login name. This is usually a numeric value or starts with a s for students. Use the same password as the one you're using to log onto your TU/e account when prompted.

Note

If you get a question about SSH key fingerprints from the server, you can verify them with the below values.

1024 SHA256:vrd92GRLJ7TyjJHu8KmULfsYb6n4zMX7I7K7ICJRrHA hpc.tue.nl (DSA)
256 SHA256:kdpFd6RFR0rQ+76L7d2WRYsaYqSxS7jDBj/PzMlHyzg hpc.tue.nl (ECDSA)
256 SHA256:a0EWqBadQrhOezlF5HuhCo/diEBMl1ElskZ4LpNci3c hpc.tue.nl (ED25519)
3072 SHA256:S2BgcB7EnIZGnDHqPe9kBm20r0p7amTSoARbXjkOLPE hpc.tue.nl (RSA)

Login nodes

Most TU/e HPC clusters are logged-into via the general log-in nodes from the TU/e: hpc.tue.nl, but some clusters have their own login node:

Hostname Department
hpc.tue.nl (suggested) -
hpc.arch.tue.nl Built Environment (BE)
chem-login001.chem.tue.nl Chemical Engineering & Chemistry (CE&C)

Passwordless Authentication

To authenticate with the HPC cluster and verify that you are who you claim you are (username), you provide a password. It is possible to use an alternative setup, where the server verifies that you own the right key. A key is, in the end, just a file on your computer, which can be (should be) password protected. The idea is to generate two files: a public key and a private key. You put the public key on the server, and let the server verify that you own the private key when logging in.

It is possible to copy the private key to other machines, so you have access from all those machines. Alternatively, you can make separate key pairs for all machines that need access to your account.

Danger

NEVER share your private key with others! They will have access to all servers you use the SSH key for. Prefer generating a new key pairs if necessary.

Available by default, no action required!

img_11.png

Open the application PutTTYgen.

  1. Select RSA as key type
  2. Enter 4096 as number of bits to use (2048 by default).
  3. Click on Generate (and follow the instructions on screen)
  4. Enter your TU/e email address as Key comment
  5. Enter a passphrase for your key
  6. Save the private key to your computer (keep this file private!)

  7. Copy the contents of the public key into your keyboard

    1. Login into the HPC cluster (see Logging In)
    2. Create the directory ~/.ssh if not exists with mkdir ~/.ssh
    3. Open / Create the file ~/.ssh/authorized_keys
    4. Paste the content of your clipboard into the ~/.ssh/authorized_keys file (and save the file).

Open the saved private key (step 6) with the Pageant program (enter the passphrase of Step 5 if prompted) and connect to the cluster as usual. You'll have to repeat this step everytime you reboot your system.

img_12.png

Open another Windows PowerShell as Administrator and enter the command below to enable and start the SSH agent

Get-Service ssh-agent | Set-Service -StartupType Automatic -PassThru | Start-Service

Open Windows PowerShell as regular user.

  1. Generate a public/private key

    ssh-keygen -t rsa -b 4096 -C "y.o.u.r.email@tue.nl"
    
  2. Upload your public key to the server To be able to use your SSH key pair to log in to the HPC cluster, you have to put your public key on the server.

    ssh-copy-id USERNAME@hpc.tue.nl
    
  3. Add the SSH key to the agent

    ssh-add
    
  4. Login into the cluster as usual (see Logging In)

Open a terminal.

  1. Generate the public/private key

    ssh-keygen -t rsa -b 4096 -C "y.o.u.r.email@tue.nl"
    

    Info

    • You will be asked where to save the key pair. Accepting the default location by pressing enter is fine.
    • When prompted for a passphrase, enter the password that protects your key. It is possible to leave this empty, but we strongly recommend choosing a strong passphrase.
  2. Configure SSH config

    Add the following content to ~/.ssh/config:

    Host *
      AddKeysToAgent yes
      UseKeychain yes
      IdentityFile ~/.ssh/id_rsa
    

    Info

    Then add your key (we use the default key location here, you may have to change this location if you picked a non-default one):

  3. Putting your public key on the HPC cluster

    To be able to use your SSH key pair to log in to the HPC cluster, you have to put your public key on the server.

    ssh-copy-id USERNAME@hpc.tue.nl
    
  4. Add the SSH key to the agent

    ssh-add
    
  5. Login into the cluster as usual (see Logging In)

Open a terminal.

  1. Generate the public/private key

    ssh-keygen -t rsa -b 4096 -C "y.o.u.r.email@tue.nl"
    

    Info

    • You will be asked where to save the key pair. Accepting the default location by pressing enter is fine.
    • When prompted for a passphrase, enter the password that protects your key. It is possible to leave this empty, but we strongly recommend choosing a strong passphrase.
  2. Configure SSH config

    Add the following content to ~/.ssh/config:

    Host *
      AddKeysToAgent yes
      UseKeychain yes
      IdentityFile ~/.ssh/id_rsa
    

    Info

    Then add your key (we use the default key location here, you may have to change this location if you picked a non-default one):

  3. Putting your public key on the HPC cluster

    To be able to use your SSH key pair to log in to the HPC cluster, you have to put your public key on the server.

    ssh-copy-id USERNAME@hpc.tue.nl
    
  4. Add the SSH key to the agent

    ssh-add
    
  5. Login into the cluster as usual (see Logging In)