UBELIX

  • {{ layer1.title }}
    • {{ layer2.title }}
      • {{ layer3.title }}
        • {{ layer4.title }}
  1. Home
  2. :: UBELIX 101

Login to the Cluster

View in Confluence Edit Page Log In Log Out

Description

This page describes how to connect to the cluster by logging into the frontend server. We also provide instructions about how to configure your SSH environment to make the login process more convenient.

On this page

Before proceeding make sure that:

  • you have your Campus Account activated for UBELIX as described here
  • you have a working SSH client
  • you are operating on a Linux/Mac environment. If you are running Microsoft Windows you can use PuTTY, but we strongly encourage you to familiarize with a Unix-based operating system, if necessary by installing a flavor of Linux using virtualization software (e.g VirtualBox)

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.

Login to the Cluster

Mac/Linux/Unix

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

		
    $ ssh <username>@submit.unibe.ch

At the password prompt enter your Campus Account password:

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

Now you should see the welcome message and the command prompt:

		
    Last login: Tue Dec  8 14:28:58 2015 from foo.unibe.ch
###################################################################
#                      Welcome on UBELIX!                         #
#               Manual: http://www.ubelix.unibe.ch/               #
#                                                                 #
#     News and important information will be distributed          #
#       exclusively over the following mailing list:              #
#   http://www.lists.unibe.ch/mailman/listinfo/grid-users/        #
#                                                                 #
#    You are connected to a system managed by the IT services     #
#              departement of the University of Bern.             #
#                   Login attempts are recorded!                  #
#    Disconnect IMMEDIATELY if you are not an authorized user!    #
###################################################################
CentOS 6.7.x86_64
FQDN:      submit01.ubelix.unibe.ch (10.1.129.21)
Processor: 24x Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz
Kernel:    2.6.32-573.8.1.el6.x86_64
Memory:    62.89 GB
-bash-4.1$

Congratulations, you successfully logged in to the cluster! You can immediately start using UBELIX. The following steps are optional but recommended.

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

 

In category "Connection"/"Data" specify:
Auto-login username: <username> (Enter your username here)

 

To save your session, in category "Session" specify:
Saved Session: ubelix (you can choose your own session name) and click the "Save" button


Click "Open" to establish a new connection.

At the password prompt enter your password

 

Now you should see the welcome message and the command prompt:


Congratulations, you successfully logged in to the cluster!

Custom SSH Environment

Mac/Linux/Unix

To simplify the login procedure you can define an alias for the user-/hostname combination. Open ~/.ssh/config in the editor of your choice (create the file if not existent):

		
    $ vim ~/.ssh/config

Add a host declaration (substitute your own alias and username):

~/.ssh/config
		
    Host <alias>
	Hostname submit.unibe.ch
	User <username>

From now on you can login to the submit host by specifying the 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 10m), you may be confronted with a "Write failed: Broken pipe" error message or the connection is simply frozen, and you are forced to login again. To prevent this from happening, configure the client to periodically (e.g. every 60s) 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

Using SSH Key Pairs

Mac/Linux/Unix

SSH keys serve as a means of identifying a user to a SSH server. With this method your password will never be send over the network.

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 whose public key you also want to use for UBELIX, you can omit the rest of this section and continue with "Adding the 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 the 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 <usrname>@submit.unibe.ch

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 <username>@submit.unibe.ch. 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 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



Related pages: