Login via SSH

Off-campus access: An active VPN connection is required. On campus (eduroam, LAN) SSH is available directly.

Quick start

The entry point for all SSH connections is the login server:

$ ssh yourusername@ssh.mathematik.hu-berlin.de
Please do not run compute-intensive programs (e.g. Matlab, simulations) on the login server. Use the compute servers instead.

Setup by operating system

Linux and macOS

SSH is pre-installed – open a terminal and connect right away.

Windows 10 / 11

Since Windows 10 (version 1809), a built-in SSH client is available. Open PowerShell or Command Prompt:

$ ssh yourusername@ssh.mathematik.hu-berlin.de

Graphical alternatives: PuTTY (SSH client) or WinSCP (file transfer).

SSH key authentication (recommended)

Key-based authentication is more secure than password login and eliminates repeated password prompts.

1. Generate a key pair (local, one-time)

$ ssh-keygen -t ed25519 -C "HU Berlin"

Accept the default path; setting a passphrase is recommended.

2. Upload your public key

$ ssh-copy-id yourusername@ssh.mathematik.hu-berlin.de

After this, you can log in without entering a password.

SSH configuration file (~/.ssh/config)

A config file saves you from repeatedly typing long hostnames. Create or edit ~/.ssh/config:

Host mathlogin
    HostName  ssh.mathematik.hu-berlin.de
    User      yourusername

After this, the following is enough:

$ ssh mathlogin

Compute servers

For compute-intensive tasks, dedicated servers are available: alpha, beta, eta, zeta, theta.

Connect directly using jump-host syntax (one step):

$ ssh -J ssh.mathematik.hu-berlin.de yourusername@beta

Or in two steps – log in first, then connect internally:

$ ssh yourusername@ssh.mathematik.hu-berlin.de
$ ssh beta

Keeping sessions alive (tmux / screen)

Terminal multiplexers prevent running processes from being killed when the SSH connection drops (network issues, closed laptop, etc.).

Action tmux screen
New session tmux new -s name screen -S name
Detach Ctrl+b, then d Ctrl+a, then d
Reattach tmux attach -t name screen -d -R name
List sessions tmux ls screen -ls

Transferring files

rsync (recommended for directories)

More efficient than scp: transfers only changed files, handles directories, and shows progress.

$ rsync -avz local/ yourusername@ssh.mathematik.hu-berlin.de:target/
$ rsync -avz yourusername@ssh.mathematik.hu-berlin.de:source/ local/

scp

$ scp file yourusername@ssh.mathematik.hu-berlin.de:target/
$ scp yourusername@ssh.mathematik.hu-berlin.de:important/diplom.ps ./

sshfs (mount your home directory)

$ sshfs yourusername@ssh.mathematik.hu-berlin.de: ~/uni_home
$ fusermount -u ~/uni_home    # unmount

Graphical file managers