Connecting from Linux/Unix

Connecting from Linux/Unix

If you are connecting to HPC2N from a computer running Linux or Unix, you have a number of options. The most obvious and commonly used one is probably the built-in SSH client SSH. Several others exist, here are some of the more common ones:

  • ssh (built-in in Linux terminal)
  • PuTTY (free)

If you want to be able to open graphical displays (say for opening the Matlab graphical interface), you need an X11 server. It is installed per default on Linux/Unix systems.

You also need to transfer files between your own home computer and HPC2N's systems. You need to use a secure protocol, so either sftp or scp will work, but not standard ftp. These are some of the options:

  • scp, sftp (built-in in Linux terminal)
  • cURL (free)
  • FileZilla (free)
  • PSFTP (Part of PuTTY. Free)

On this page we will give brief examples for ssh, scp/sftp, PuTTY, and FileZilla.

In all cases, we strongly advice against saving passwords.

The simplest way to connect to HPC2N is to use the built-in ssh from the terminal.

NOTE: remember that the accounts at HPC2N and SUPR are separate. In the welcome mail you got when your HPC2N account was created was a link to create a first, temporary password. When you have logged in using that, please change the password.

SSH clients

ssh

  1. Launch a terminal
  2. Connect to Kebnekaise by doing:
    ssh username@kebnekaise.hpc2n.umu.se 

    where username is your username at HPC2N.

  3. If you need to open displays from the remote host on your local machine (say, for graphical interfaces to some software), you must use the flag -X (or -Y in some cases, if you need to type something in the display, like in MATLAB):
    ssh -X username@kebnekaise.hpc2n.umu.se

PuTTY

  1. Download PuTTY
  2. Unpack the tarball (For version 0.70: tar zxvf putty-0.70.tar.gz)
  3. cd into the directory created by the above command
  4. cd unix
    ./configure
    make
    
  5. It should build without problems. If you need the graphical utilities instead of just using it from the command line, you need Gtk+-1.2, Gtk+-2.0, or Gtk+-3.0 installed. More information can be found in the file README in the top putty directory.
  6. Launch the graphical interface with
    ./putty

    from the unix directory under the PuTTY directory. Enter kebnekaise.hpc2n.umu.se as the host: putty-linux-kebnekaise.png

  7. The first time you connect you will be asked to accept the host key. Do so. Then login with your HPC2N username and password.
  8. In order to use remote graphical interfaces, you need to enable X11 forwarding. Scroll down in the left side of the PuTTY window to SSH. Click the small arrow to get to the sub-options. Click X11. Check "Enable X11 forwarding": putty-linux.x11.png

File transfers

scp/sftp

  • scp and sftp should be installed on your Linux installation
  • scp - secure copy - copies files between hosts on a network. It uses ssh for data transfer.
    • Copy file from remote host to local host
      scp username@remotehost:file local-directory
    • Copy file from local host to remote host
      scp file username@remotehost:remote-directory
    • Copy directory from local host to remote host (and renaming directory to new-directory)
      scp -r local-directory username@remotehost:remote-directory/new-directory
    • Copy multiple files from local host to your home directory on remote host
      scp file1 file2 username@remotehost:~
    • Copy multiple files from remote host to current directory on local host
      scp username@remotehost:/remote-directory/\{file1,file2,file3\} .
  • More info: man scp
  • sftp - secure file transfer program. Similar to FTP, but with many of the features of SSH included.
    • Interactive
      sftp username@remotehost
    • Retrieve files without interaction
      sftp username@remotehost:file ...
  • More info: man sftp

FileZilla

  • Ubuntu: download and install with package manager (apt-get install filezilla)
  • You can also download from FileZilla homepage if you are not using Ubuntu. Pick the one for "All platforms". There is one for Debian (the executable is in the bin subdiretory and is called filezilla). If upi are not using Debian or Ubuntu, you will probably have to  compile from source.
  • When building from source (You also need to download and install libfilezilla in much the same way):
    • uncompress the tarball, enter the directory created
    • mkdir compile
    • cd compile
    • ../configure
    • make
    • make install
  • This is how it looks when FileZilla has started up: filezilla-linux.png
  • Connect by entering kebnekaise.hpc2n.umu.se in the "Host" field, then put in your HPC2N username under "Username". We strongly recommend not saving your password.
Updated: 2024-03-08, 14:54