marinetics blog


Bioinformatics Solutions in Ecology and Evolution

08 Feb 2015

Remote connection

Tagged: Commandline






Related Posts

Got some sequencing data? Many powerful tools to analyse them are based on the command line and this is part of a series of short but essential posts that help you getting started. I assume that you are working on a UNIX-based operating system (‘Mac’ or ‘Linux’ computer).

Remote connection via ssh

When does it become necessary to work on a remote cluster/server? Either your personal computer simply does not have enough RAM or you don’t want to allocate the capacity of your own computer to an analysis that may run for several days. Moreover, if you are working on a ‘Windows’ computer, remote connection (via PUTTY (http://www.putty.org/, not described in more detail here) is a way for you to access a UNIX-based system. What you need from the system administrator of such a cluster or server are:

  • A password (e.g. PWD213)
  • A username (e.g. user1)
  • An IP address (e.g. 127.0.0.1)

On ‘Mac’ and ‘Linux’ computers, the ssh (Secure Shell) tool is generally installed by default. To connect to a remote server, thus, just open the command line/terminal and type:

ssh user1@127.0.0.1

Replace ‘user1’ and the IP address ‘127.0.0.1’ with your own username and the IP address of the remote computer you want to connect to.

If this is the first time you want to access the remote server, you will likely get the following warning

The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
ECDSA key fingerprint is 38:59:f7:22:e5:85:ec:c3:9c:90:7x:c3:e4:ae:88:18.
Are you sure you want to continue connecting (yes/no)?

Just type ‘yes’ and hit enter. You will be asked to enter your password. You will not see the password when you enter it, so just type it blindly and hit enter.

user1@127.0.0.1's password:

When you connected successfully, you will see a welcome-text similar to:

Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-35-generic x86_64)

Congratulations!

If you don’t only want to use the command line on the remote host, but also want to use the Graphical User Interface to open figures, GUI-based programs or web browsers, you should add the -X option to your command (if you use PUTTY, you need to install Xming (http://www.straightrunning.com/XmingNotes/) and follow the guidelines on http://www.geo.mtu.edu/geoschem/docs/putty_install.html):

ssh -X user1@127.0.0.1