Secure shell (SSH) is a replacement for telnet. telnet uses plain text protocol so a man in the middle can see what is being exchanged between client and server including sensitive information like passwords. A more sophisticated hacker can even hijack your connection.

SSH deals with these vulnerabilities of telnet service using SSL and uses data encryption. Let us see how SSH can be used to login to a remote system for shell access.

[liz@techpulp ~]# ssh liz@neo.techpulp.com
The authenticity of host 'neo.techpulp.com (65.35.38.45)' can't be established.
RSA key fingerprint is fa:e7:9f:10:e4:bb:de:2a:c9:aa:7f:92:be:4a:58:7c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'neo.techpulp.com' (RSA) to the list of known hosts.
liz@neo.techpulp.com's password:
Last login: Thu Jun 26 12:58:33 2008 from liz.techpulp.com
bash#

You need to provide your user name and the remote host name as command line argument. If you are connecting for the first time, you will be prompted to confirm the finger print of the remote server. Once you cofirm it the key is stored in a file (~/.ssh/known_hosts). Then on SSH will not prompt user to confirm the finger print of remote server as long as it matches with the one stored in the file ~/.ssh/known_hosts.

There are two cases where finger print mismatch may occur.

  1. Your remote host is replaced with another host with same IP address. Another possibility is that your remote host has new SSH key because of reinstallation of operating system. You better confirm it with the administrator or the service provider for it.
  2. Some hacker is trying to pose as if his computer is the remote host that you are trying to connect to. This is a serious offence you should be worried about. This is typically called connection hijacking attack.

In any of the above cases, ensure that the new finger print that is received is in fact the finger print of the remote host. If you are sure about that you can remove corresponding entry of the remote host in ~/.ssh/known_hosts file and try to reconnect.