Configuring SSH
OpenSSH, sftp, rsync, VSCode, …
The OpenSSH configuration file is a plain text file that defines Hosts with short, easy to type names and corresponding full DNS names (or IPs) and advanced configuration options, which private key to use, etc. This file being picked up and read by multiple SSH clients or other applications that use the SSH protocol to connect to the cluster. Most clients let you override the defaults in this file for any given login.
Config file location
It is usually located in your home directory or user profile directory under .ssh/config
, i.e.
~/.ssh/config
/home/$USERNAME/.ssh/config
~/.ssh/config
/User/$USERNAME/.ssh/config
%USERPROFILE%\.ssh\config
C:\Users\your_username\.ssh\config
OpenSSH config file format
After general options that apply to all SSH connections, you can define a line Host my_shorthand
, followed by options that will apply to this host only, until another Host xyz
line is encountered.
See the OpenSSH documentation for a full list of available options.
Simple configuration examples
Here are different blocks of configuration options you can copy-paste into your config file. You can mix-and-match these, choose the ones you need.
Just make sure to replace User xyz
with your respective username and if necessary, the path/filename of your private key.
SCC with VPN/Wireguard or inside GÖNET
Host SCC
Hostname login-mdc.hpc.gwdg.de
User jdoe1
IdentityFile ~/.ssh/id_ed25519
Host SCC-transfer
Hostname transfer-scc.hpc.gwdg.de
User jdoe1
IdentityFile ~/.ssh/id_ed25519
SCC from outside GÖNET, without VPN
Host gwdg-login # not part of the HPC-cluster!
Hostname login.gwdg.de
User jdoe1
IdentityFile ~/.ssh/id_ed25519
Host gwdg-login-transfer # not part of the HPC-cluster!
Hostname transfer.gwdg.de
User jdoe1
IdentityFile ~/.ssh/id_ed25519
Host SCC
Hostname login-mdc.hpc.gwdg.de
User jdoe1
IdentityFile ~/.ssh/id_ed25519
ProxyJump gwdg-login
Host SCC-transfer
Hostname transfer-scc.hpc.gwdg.de
User jdoe1
IdentityFile ~/.ssh/id_ed25519
ProxyJump gwdg-login-transfer
The gwdg-login
and gwdg-login-transfer
hosts are not usable if your HPC access is granted via the HPC Project Portal
NHR / HLRN
Host Emmy-p1
Hostname glogin-p1.hpc.gwdg.de
User nimjdoe
IdentityFile ~/.ssh/id_ed25519
Host Emmy-p2
Hostname glogin-p2.hpc.gwdg.de
User nimjdoe
IdentityFile ~/.ssh/id_ed25519
Host Emmy-p3
Hostname glogin-p3.hpc.gwdg.de
User nimjdoe
IdentityFile ~/.ssh/id_ed25519
Host Grete
Hostname glogin-gpu.hpc.gwdg.de
User nimjdoe
IdentityFile ~/.ssh/id_ed25519
KISSKI
Host KISSKI
Hostname glogin9.hpc.gwdg.de
User u10123
IdentityFile ~/.ssh/id_ed25519
Advanced configuration examples
Here are more advanced example configuration for all our clusters with convenient shortcuts for advanced users. Adapt to your needs. To understand this, remember ssh parses it’s config top-down and first-come-first-serve.
That means, if for a given Host
the same option appears multiple times, the first one counts and later values are ignored.
But for options not defined earlier, values will apply from successive appearances.
Note that if Hostname
is not specified, the host value is used.
All frontend nodes, individually specified
# SCC jumphosts
Host gwdu19.gwdg.de gwdu20.gwdg.de login.gwdg.de transfer.gwdg.de
User jdoe1
IdentityFile ~/.ssh/id_ed25519
# SCC login nodes
Host gwdu101.gwdg.de gwdu102.gwdg.e gwdu108.gwdg login-mdc.hpc.gwdg.de
User jdoe1
IdentityFile ~/.ssh/id_ed25519
# ProxyJump login.gwdg.de # Uncomment if not on GÖNET
# SCC transfer node
Host transfer-scc.gwdg.de transfer-mdc.hpc.gwdg.de
User jdoe1
IdentityFile ~/.ssh/id_ed25519
# ProxyJump transfer.gwdg.de # Uncomment if not on GÖNET
# NHR/HLRN and KISSKI
Host glogin*.hpc.gwdg.de glogin*.hlrn.de
User nimjdoe
IdentityFile ~/.ssh/id_ed25519
# CIDBN
Host login-dbn02.hpc.gwdg.de
User jdoe1
IdentityFile ~/.ssh/id_ed25519
# ProxyJump login.gwdg.de # Uncomment if not on GÖNET
# sa/hh
Host ngs01.hpc.gwdg.de
User jdoe1
IdentityFile ~/.ssh/id_ed25519
# ProxyJump login.gwdg.de # Uncomment if not on GÖNET
Complex example using config file tricks
Host SCC
Hostname login-mdc.hpc.gwdg.de
Host SCC-transfer
Hostname transfer-mdc.hpc.gwdg.de
Host SCC SCC-transfer gwdu101 gwdu102 gwdu108
Hostname %h.gwdg.de
User jdoe1
IdentityFile ~/.ssh/id_ed25519
Host myNHRproject1
User u10123
Host myNHRproject2
User u10456
Host NHR myNHRproject1 myNHRproject2
Hostname glogin.hpc.gwdg.de
Host kisski
Hostname glogin9.hpc.gwdg.de
User u10789
Host glogin* glogin-gpu glogin-p3 kisski NHR myNHRproject1 myNHRproject2
Hostname %h.hpc.gwdg.de
User nimjdoe
IdentityFile ~/.ssh/id_ed25519