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

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:

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.

SSH clients


  1. Launch a terminal
  2. Connect to Abisko or Kebnekaise by doing:



    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


    ssh -X


  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
  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

    from the unix directory under the PuTTY directory. Enter either or 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 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


  • 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 either or in the "Host" field, then put in your HPC2N username under "Username". We strongly recommend not saving your password.
Updated: 2017-09-21, 11:05