You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Using the shell

To access and use AWI's HPC systems login via a terminal is needed, using ssh.

Although, in general it is possible to use tools with a graphical user interface (GUI) remotely via ssh, some basic knowledge on how to use the shell is required.

We advise all new users, who have never worked in a shell on a Unix-like system, to go through this nice introduction: 

https://swcarpentry.github.io/shell-novice/

This tutorial is a good starting point where you learn to navigate in the filesystem, manipulate files, and create and run scripts.

Login with ssh-keys

Resources

Example: stan

Here is an example for my (Natalja's) desktop connecting to NEC SX-ACE Stan. Please replace username and remote machine accordingly!

  • Generate a key on your local desktop or whatever machine you want to connect to stan0 and stan1

    rakowsky@binf02l006:~$ ssh-keygen -f ~/.ssh/id_rsa_awihome-stan -t rsa -b 4096

    Here, we stick to rsa to be on the safe side to generate a portable key. For more recent machines, ssh.com recommends ecdsa: ssh-keygen -t ecdsa -b 521
    You are asked for a passphrase. A passphrase increases the security in case your account is hacked or your notebook gets lost, and it is a must for connections between systems at different locations, e.g., from AWI to HLRN or from home to AWI.
    Two files are generated

    1. the private key ~/.ssh/id_rsa_awihome-stan remains on your local machine,

    2. the public key ~/.ssh/id_rsa_awihome-stan.pub is copied to the remote machine.

  • Our recommendation is to have a pair of private+public keys for each local+remote connection. It helps to keep an overview and a good naming scheme helps to prevent the danger of overwriting an existing key.
  • Copy the public key to Stan, here to stan1, this also makes the key available on stan0, as they share the home directory:

    rakowsky@binf02l006:~$ ssh-copy-id -i ~/.ssh/id_rsa_awihome-stan.pub rakowsky@stan1

    For some destinations, to increase the security, the public key has to be uploaded in a web portal, and it is not placed in your remote home directory.  

  • Log in to stan0 or stan1 with

    rakowsky@binf02l006:~$ ssh -i ~/.ssh/id_rsa_awihome-stan -Y rakowsky@stan0
  • Or, for convenience, add an entry to ~/.ssh/config on your local desktop. Generate this file, if not yet present.

    rakowsky@binf02l006:~$ cat ~/.ssh/config
    Host stan
    Hostname stan.awi.de
    IdentityFile ~/.ssh/id_rsa_awihome-stan
    User rakowsky

    and log in with

    rakowsky@binf02l006:~$ ssh -Y stan


  • No labels