Skip to content

Login

Description

UBELIX is available to everybody with a valid Campus Account (CA) of the University of Bern. The cluster is meant to be used for research related to the University of Bern. Before you can use this service we have to activate your CA for UBELIX, see Accounts and Activation. This page contains information on how to configure your SSH environment for a simplified login procedure and information regarding the application of a CA for external researchers.

Log in to UBELIX

Before proceeding make sure that:

  • you have your Campus Account activated for UBELIX (see above)
  • you have a working SSH client
    • Linux/Mac: e.g ssh command in a terminal
    • Microsoft Windows: you can use PuTTY, MobaXterm, or the Linux subsystem. Alternatively, a flavor of Linux can be installed on Microsoft Windows using virtualization software (e.g VirtualBox). We strongly encourage you to familiarize with a Unix-based operating system.

Requirement

Login to UBELIX is only possible from within the UniBE network. If you want to connect from outside, you must first establish a VPN connection. For VPN profiles and instructions see the official tutorial.

Mac/Linux/Unix

Run the following commands in a terminal. Open an SSH connection to the submit host:

$ ssh <username>@submit.unibe.ch
OR
$ ssh -l <username> submit.unibe.ch
At the password prompt enter your Campus Account password:

$ ssh <username>@submit.unibe.ch
Password:

Usually there is no indication of typing when entering your password (not even asterisks or bullets). That’s intended. Just enter your password and press ‘enter’.

After log in successfully you will see the welcome message and the command prompt:

Last login: Tue Apr 21 16:17:26 2020

CentOS 7.7.1908.x86_64

FQDN:      submit01.ubelix.unibe.ch (10.1.129.21)
Processor: 24x Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz
Kernel:    3.10.0-1062.9.1.el7.x86_64
Memory:    62.73 GiB

Congratulations, you just logged in to the cluster! You can immediately start using UBELIX.

Microsoft Windows

We use PuTTY to illustrate how to establish a SSH connection from a Windows client to UBELIX. There are of course other SSH clients for Windows available that serve the same purpose.

Download

You can download PuTTY from http://www.putty.org

In category “Session” specify:
Connection type: SSH
Host name (or IP address): submit.unibe.ch
Port: 22

login-putty

In category “Connection”/”Data” specify: Auto-login username: (Enter your username here)

autologin-putty

To save your session, in category “Session” specify:

Saved Session: ubelix (you can choose your own session name) and click the “Save” button

login-putty

Click “Open” to establish a new connection.

At the password prompt enter your password:

login-putty

Usually there is no indication of typing when entering your password (not even asterisks or bullets). That’s intended. Just enter your password and press ‘enter’.

After log in successfully you will see the welcome message and the command prompt:

login-putty

Congratulations, you just logged in to the cluster! You can immediately start using UBELIX.

Customize your SSH session

Useful feartures like SSH alias, X and port forwarding are described on our page SSH customization.

Create a SSH alias

Mac/Linux/Unix

To simplify the login procedure you can define an alias for the user-/hostname combination. Add a host declaration to ~/.ssh/config (substitute your own alias and username):

~/.ssh/config

Host <alias>
    Hostname submit.unibe.ch
    User <username>

From now on you can log in to the cluster by using the specified alias:

$ ssh <alias>

You still have to provide your password!

SSH session timeout

Mac/Linux/Unix
If a SSH connection goes idle for a specific amount of time (default 10 minutes), you may be confronted with a “Write failed: Broken pipe” error message or the connection is simply frozen, and you are forced to log in again. To prevent this from happening, configure the client to periodically (e.g. every 60 seconds) send a message to trigger a response from the remote server. To do so, add the following line to the SSH configuration file:

ServerAliveInterval 60

The host declaration may now look like this:

~/.ssh/config

Host <alias>
    Hostname submit.unibe.ch
    User <username>
    ServerAliveInterval 60

SSH key pairs

Mac/Linux/Unix
SSH keys serve as a means of identifying a user to a SSH server. When using SSH keys your password will never be send over the network.

Remember to always keep your private key private! Only share your public key, never share your private key.

If you already have a valid private/public key pair that you also want to use for UBELIX, you can omit the rest of this section and continue with “Adding a public key to your UBELIX account”.

First, generate a private/public key pair. You can substitute your own comment (-C). To accept the default name/location simply press Enter, otherwise specify a different name/location:

$ ssh-keygen -t rsa -b 4096 -C "ubelix"
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/faerber/.ssh/id_rsa):

Enter and confirm a secure passphrase:

If you do not specify a passphrase and someone else gets a copy of your private key, then he will be able to login with your identity on any account that uses the corresponding public key!

Enter passphrase (empty for no passphrase):
Enter same passphrase again:

Adding a public key to your UBELIX account
If you have specified a custom name/location for your SSH keys, you can tell your SSH client to use this key for connecting to UBELIX by specifying the private key on the command line:

$ ssh -i ~/.ssh/id_rsa_ubelix <alias>

or even better, add the key to your host declaration in your ssh configuration:

~/.ssh/config

Host <alias>
    Hostname submit.unibe.ch
    User <username>
    ServerAliveInterval 60
    IdentityFile ~/.ssh/id_rsa_ubelix

Now, login to UBELIX and append your public key (content of id_rsa.pub) to the file ~/.ssh/authorized_keys. This step can also be done by simply issuing ssh-copy-id -i ~/.ssh/id_rsa_ubelix.pub . If everything was correct, you will now be able to login without providing you Campus Account password upon your next login attempt. However, if you have secured your key with a passphrase, you will get prompted for your passphrase instead. You can use ssh-agent to securely save your passphrase, so you do not have to re-enter it all the time.

Adding your Key to SSH-Agent
The behavior of ssh-agent depends on the flavor and version of your operating system. On OS X Leopard or later your keys can be saved in the system’s keychain. Most Linux installations will automatically start ssh-agent when you log in.

Add the key to ssh-agent:

$ ssh-add ~/.ssh/id_rsa_ubelix

Passwordless ssh within the HPCs if you want to ssh passwordless to other nodes within the HPCs or want to use services like JupyterLab, you need to generate and register a new key within the HPC. Thus run the following commands on e.g. the submit node:

ssh-keygen -t rsa -b 4096
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 640 .ssh/authorized_keys