Adding Complexity to the Example
The preceding example session provided a quick introduction to the most often-used client programs--ssh and scp--in a format to follow while sitting at your computer. Now that you have the basics, let’s continue the example but include situations and complications glossed over the first time. These include the “known hosts” security feature and the SSH escape character.
Tip
If you’re following at the computer as you read, your SSH clients might behave unexpectedly or differently from ours. As you will see throughout the book, SSH implementations are highly customizable, by both yourself and the system administrator, on either side of the secure connection. Although this chapter describes common behaviors of SSH programs based on their installation defaults, your system might be set up differently.
If commands don’t work as you expect, try adding the -v (“verbose”) command-line option, for example:
$ ssh -v shell.isp.com
This causes the client to print lots of information about its progress, often revealing the source of the discrepancy.
2.3.1 Known Hosts
The first time an SSH client encounters a new remote machine, it may report that it’s never seen the machine before, printing a message like the following:
$ ssh -l pat shell.isp.com The authenticity of host 'shell.isp.com (192.168.0.2)' can't be established. RSA key fingerprint is 77:a5:69:81:9b:eb:40:76:7b:13:04:a9:6c:f4:9c:5d. Are you sure you want to continue connecting (yes/no)?
Assuming you respond ...
Get SSH, The Secure Shell: The Definitive Guide, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.