-
Notifications
You must be signed in to change notification settings - Fork 1
Connect to a remote server using ssh
On this course we will be working on a remote server during the exercise. We'll use the program ssh for connecting to the server, and this program requires (1) an address to the server (2) a user name and (3) a password for your account. You should already have received these from one of the teachers on the course. ssh works like this:
ssh -Y USER@ADDRESSTo start with, open a terminal window (e.g "Terminal" on MAC OSX and GNU/Linux, or MobaXterm on Windows) and type the command above, but exchange USER and ADDRESS with the information provided by the teacher. It could look something like this:
topel@Slartibartfasts:~$ ssh -Y mats@albiorix.bioenv.gu.seAfter typing in your password you'll be prompted with a message similar to this:
The authenticity of host 'pc158250.dpes.gu.se (130.241.158.250)' can't be established.
RSA key fingerprint is 4b:1e:99:2e:01:e3:3e:0c:69:93:77:23:5e:d2:91:15.
Are you sure you want to continue connecting (yes/no)?Just type yes to be logged in.
Now is a good time to change your password. On some servers you'll be promoted to do so automatically, or else this can be done by running the command passwd and follow the instructions on the screen.
The characters -Y in the example above is an option to ssh that alters its behaviour. In this example it allows the remote server to send graphical output to your local computer. This means that you will be able to run programs with graphical user interfaces (GUI's) on the server and see the output on your screen. You can test this by typing the following command:
[mats@rudy ~]$ gedit If everything worked as planned then you should see a text editor window appear on your screen.
- Note: If you are using MobaXterm on Windows, you may need to select 'X server > Start X server' from the toolbar.