Chapter 2: Remote Working

Secure Shell

face Josiah Wang Tom Crossland

So how do we actually connect to other machines?

We do this using SSH, which stands for “Secure Shell”. This is a network communications protocol that allows us to share data with and perform operations on other computers – and allows us to do so securely, even over unsecure networks.

In order to do this, we first need an address for the other machine we want to connect to.

In general, this will look like a web URL, something like shell1.doc.ic.ac.uk, or an IP address like 155.198. 30.71.

However, when we’re inside the DoC network, we can simply use the name of the computer we want to connect to.

Remember how to find the name of your machine? It’s written on the terminal prompt!

username@MACHINE:~$

It will also have been shown on the computer screen before you logged in.

So, let’s say our neighbour is on the machine friend01. We can connect to their machine using SSH with the following:

username@MACHINE:~$ ssh friend01

You may be prompted to enter a yes when you connect to a machine you haven’t connected to before.

When you log in, you will see that your terminal prompt has changed to reflect the fact you’re not logged in to another machine.

username@friend01:~$

And that’s it! You’re now logged in to your neighbour’s machine.

Exercise 3

  1. Find out the name of your neighbour’s computer.
  2. SSH into their computer.