Skip to main content
Skip to main content

SSH Basics

HPC: OMNI

 

Important Note: As of July 21, 2026, it is no longer possible to log in to the cluster using a password.

The connection to the cluster is typically established via the SSH (Secure Shell) protocol. SSH enables an encrypted and secure connection to a remote computer, such as a cluster.

The required SSH client is already available on common operating systems:

Operating System Program SSH Command
Linux Terminal ssh
macOS Terminal ssh
Windows PowerShell SSH
Windows Command Prompt (CMD) ssh

For example, you can establish a connection using the following command:

ssh username@serveraddress

On Linux and macOS, the OpenSSH client is installed by default. Recent versions of Windows also include a built-in OpenSSH client. This allows you to establish an SSH connection directly via the Terminal, Command Prompt, or PowerShell.

Alternatively, graphical SSH programs such as PuTTY or MobaXterm can be used. However, this guide does not cover the use of these programs.

 

Note: Your user account must be activated for use with the HPC system. Without proper activation, you cannot connect to the cluster.

 

Other Uses of SSH

SSH can be used for more than just logging in to the cluster. Among other things, it offers the following capabilities:

  • File Transfer: Using scp (Secure Copy) or sftp, files can be securely transferred between your local computer and the cluster.
  • Port forwarding: Network connections can be securely forwarded via SSH.
  • Running graphical applications: Under certain conditions, programs with graphical user interfaces can also be run on the cluster. In this case, the application window is displayed on the local computer.

By default, you can run programs via an SSH connection that are operated exclusively via the command line. Additional configuration is required for graphical applications.

If you want to run graphical programs on the cluster, an appropriate X server must be available on your local computer. In addition, the SSH connection must be configured to forward the graphical output. Whether and how this works depends on the operating system you are using.

Generate an SSH key

An SSH key pair consists of two keys that belong together:

  • Private key: This key must remain exclusively on your own computer and must not be shared with anyone.
  • Public key: This key is stored in the SSH management tool and can be shared without any issues.

With an SSH key pair, you can securely log in to the cluster without having to enter a password for the cluster every time you connect.

 

1. Create an SSH key pair

Open a terminal on your local computer and run the following command:

ssh-keygen

In current versions of OpenSSH, an Ed25519 key pair is created by default.

By default, the keys are stored in the .ssh directory in your home directory:

File Meaning
~/.ssh/id_ed25519 Private key – keep it secret and never share it
~/.ssh/id_ed25519.pub Public key – stored in the SSH management tool

If you simply press the Enter key when prompted for the storage location, the suggested default settings will be used.

If a key pair with this name already exists, you will receive a warning. You can then either use the existing key pair or specify a different filename for the new key pair.

Important: Do not overwrite an existing private key if you are still using it for other systems.

 

2. Set a passphrase

When creating the key pair, you’ll be asked if you want to protect the private key with a passphrase.

It is recommended that you set a passphrase. It provides additional protection for your private key in case someone gains access to your computer or the key file.

The passphrase is not the password for the cluster. It only protects your private key.

If you use a passphrase, it may be cached by an SSH agent, depending on your configuration. This means you won’t have to re-enter the passphrase every time you establish an SSH connection.

 

3. Upload Public Key

After creating the key pair, you must register your public key with the SSH management tool.

By default, the public key is located in the file:

~/.ssh/id_ed25519.pub

Warning: Upload only the public key (id_ed25519.pub). You must never upload your private key (id_ed25519) or share it with anyone else.

 

  1. Open the SSH Management Tool and log in with your university user ID (e.g., ms149425, gk123, u534622 without the @uni-siegen.de domain).
  2. Select the menu item “Manage SSH Keys.”
  3. Open your id_ed25519.pub file—for example, using a text editor—and copy the entire contents
  4. Paste the contents of your id_ed25519.pub file into the field provided.
  5. Select whether you want to add the new key or replace all previously stored keys.
    • Add: The new key is stored in addition to any existing keys.
    • Replace all keys: The keys stored so far will be replaced by the new key.
  6. Click “Save SSH Key.”

This completes the setup. You can then log in to the cluster using your SSH key.

 

Using Multiple SSH Keys

You can use multiple SSH keys. This is useful, for example, if you want to connect to the cluster from multiple computers.

You can create a separate key pair for each computer and store the corresponding public key in the SSH management tool. For example, you can use one key for your workstation and another for your laptop.

The keys can have different names, for example:

~/.ssh/id_ed25519
~/.ssh/id_ed25519.pub

and

~/.ssh/id_ed25519_laptop
~/.ssh/id_ed25519_laptop.pub

If you use multiple keys, you can configure SSH via the ~/.ssh/config file so that the correct key is automatically used for the cluster.

 

Private Key Security

The private key is the most important part of your SSH key pair. It must always remain on your own computer and must never be shared with anyone else.

In particular, you must never share the file

~/.ssh/id_ed25519

via email, chat, or any other insecure means.

Only the file

~/.ssh/id_ed25519.pub

is stored in the SSH management tool.

Set Up an SSH Key

After you have created your SSH key pair, you must add the public key to the SSH management tool.

  1. Open the SSH Management Tool and log in with your university username (e.g., ms149425, gk123, u534622 without the @uni-siegen.de domain).
  2. Select the menu item “Manage SSH Keys.”
  3. Paste the contents of your id_ed25519.pub file into the field provided.
  4. Choose whether you want to add the new key or replace all previously stored keys.
    • Add: The new key will be stored in addition to any existing keys.
    • Replace all keys: The previously stored keys will be replaced by the new key.
  5. Click “Save SSH Key.”

This completes the setup. You can then log in to the cluster using your SSH key.

SSH Basics: Usage

In the console, you can establish an SSH connection using thesshcommand:

ssh -X @

X Support

To enable X support, you must start the SSH connection with-X:

ssh -X @

The alternative option-Yworks almost identically. The difference is that the connection is considered “trusted,” meaning fewer security checks are performed. This is only recommended if a program does not run with-X.

 

Configuring SSH Connections

You can preconfigure your SSH connection to the cluster so you don’t have to enter the entire SSH command shown above every time. To do this, open the file`//.ssh/config`on your local computer using a text editor and enter the following:

host omni
  HostName   User   ForwardX11 yes

The top line is the name of your alias. You can choose any name; in this example, it is“omni.” The“User”line must contain the username you use to log in to the cluster. The“ForwardX11 yes”line is optional. If you add this line, SSH connections will always be established with X support. This is identical to the -X option; the equivalent of the-Y option would be `ForwardX11Trusted yes`. There are a number of other options described on theOpenSSH website.

With this configuration, you can log in to the cluster using a shortcut command:

ssh omni
 

Setting Up SSH: macOS

On macOS, you can open a Linux-like console by typing`terminal`intoSpotlight Search or by installing theiTerm program. For X support, you must also installXQuartz.

Setup is then the same as for Linux systems. Password-less access is also possible in the same way. If XQuartz is installed, an additional step is required: the following lines must be added to the~/.ssh/configfile:

host *
  XAuthLocation /opt/X11/bin/xauth

After that, X support works the same way as it does in Linux.

File Transfer

If you want to transfer files to or from the cluster to your own computer, you can do so using the Secure Copy (scp) function. If your operating system supports thesshcommand,scpis usually available as well.

The syntax works very similarly to the Linux command`cp`, with the difference that for remote systems, you must specify the computer name (hostname) and, if necessary, other SSH options such as your username:

scp  :

Example:

scp example-folder/example-file.txt IhrUsername@beispielhost.uni-siegen.de:/home/demo_user/

Note that the path to the destination file is separated from the name of the destination system by acolon. This example would copy the source file to the remote path. If you want to copy a file from the cluster to your PC, the source file must be preceded by a hostname (along with the other SSH options). You can also copy files between two remote systems; in this case, both the source and destination files must be preceded by a hostname. If you specify a nonexistent filename as the destination, the source file will be saved under that filename. Instead of a full hostname, you can also use an SSH preset, as described above in the section “Configuring SSH Connections.”

Unlike `cp`,`scp` displays a progress message by default when a file is being transferred.

It is not possible to run`scp`on the cluster itself; this is due to the university’s firewall settings. Regardless of the direction in which you are copying files, you must always run`scp`on your PC. Also note that you must specify the-roption if you want to copy entire directories along with their contents, similar to the`cp` command. You can view additional options by running the command`man scp`.

 

Alternatives to scp

In addition toscp, there are other options for file transfer. The`rsync`command works similarly toscp, is also available on every Linux and macOS system, and supports more complex operations such as resuming transfers after connection interruptions.

In addition, there are several graphical clients that support file transfer using various methods. Examples include the previously mentioned programs MobaXTerm and WinSCP (both Windows), FileZilla (Windows, Linux), Forklift (macOS), and the built-in file browser on GNOME-based Linux systems (e.g., Ubuntu). You’ll need to consult the respective documentation for these.