Skip to content

Connect via SSH

Andrea Telatin edited this page Nov 16, 2021 · 5 revisions

What is it?

A Linux computer (including servers and virtual servers) have a command line interface (CLI) to interact with files and programs. The command line is very convenient, and it is in fact very user friendly to perform repetitive tasks, much more than a point-and-click interface that would force you to repeat tasks with the risk of introducing errors in the procedure.

Accessing a remote server (from a terminal)

💡 Remember: you need three things to log in: the remote address, your remote username and your remote password.

We can access a remote server only if we have a user account inside that server, and of course we need to know the address of the remote server. For this example let's suppose that our username is ubuntu and that the remote server has this address 147.188.173.69.

If your local computer already has a UNIX terminal (e.g. all Macs and all Linux computers have one), you can use your local terminal to connect to the remote machine.

In OS X you'll find the Terminal application inside the Applications folder, and can fire it up using Spotlight and typing “Terminal”. When the terminal is open, type the command:

ssh username@machine

If this is the first time you try to access a new server, then you'll get a message like this:

The authenticity of host '<server name>' can't be established.
RSA key fingerprint is SHA256:H5D4SW4xqEMp6TJCtDR76xxc5h+7bW4bvBP4r9rQ9jM.
Are you sure you want to continue connecting (yes/no)?

You can safely type yes and then hit Enter.

⚠️ You'll be prompted to enter the password.

Type it very carefully (as errors could prevent us to go on with the practical) and be aware that you won't see asterisks or dots ❗ while you type. Just hit enter at the end.

Terminal emulator for Windows

PuTTY

There is a free terminal emulator for Windows called PuTTY, that we can download and launch to access the remote machine. Once launched we just need to type username@machine_address in the appropriate form field and then

If this is the first time you try to access a new server, then you'll get a message like this:

The authenticity of host '<server name>' can't be established.
RSA key fingerprint is SHA256:H5D4SW4xqEMp6TJCtDR76xxc5h+7bW4bvBP4r9rQ9jM.
Are you sure you want to continue connecting (yes/no)?

You can safely type yes and then hit Enter.

⚠️ You'll be promted to enter the password, note that you will not see any character while typing.

Type it very carefully (as errors could prevent us to go on with the practical) and be aware that you won't see asterisks or dots while you type. Just hit enter at the end.

Now you have a Terminal session like any other, just inside a Windows program.

Menu

Clone this wiki locally