Differences

This shows you the differences between two versions of the page.

Link to this comparison view

bash-ssh [2018/02/22 07:08] (current)
telatina created
Line 1: Line 1:
 +====== SSH access to a remote machine ======
 +{{:​0_easy.png?​nolink&​22|}} Beginner tutorial
 +===== 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) =====
 +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:
 +<code bash>
 +ssh username@machine
 +</​code>​
 +
 +If this is the //first time// you try to access a new server, then you'll get a message like this:
 +<​code>​
 +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)?
 +</​code>​
 +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 =====
 +There is a free terminal emulator for Windows called **[[https://​www.chiark.greenend.org.uk/​~sgtatham/​putty/​latest.html|Putty]]**,​ that we can [[https://​the.earth.li/​~sgtatham/​putty/​latest/​w64/​putty.exe|download it]] and launch to access the remote machine. Once launched we just need to type ''​username@machine_address''​ in the appropriate form field and then 
 +{{ ::​putty.png?​400 |}}
 +
 +
 +If this is the //first time// you try to access a new server, then you'll get a message like this:
 +<​code>​
 +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)?
 +</​code>​
 +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.
 +
 +