next up previous
Next: Generating SSH2 Key Pairs Up: Introduction to SSH Versions Previous: A simple SSH session

Advanced Topics: Public/Private Key Pairs

While this form of SSH connection is much more secure than standard telnet or rsh, there is a still more secure method involving the use of Public/Private Key cryptography. The way it works is this: You invoke the ssh-keygen program to randomly generate a pair of encryption keys, one of which will be deemed ``public'' and the other ``private.'' You then can upload your public key to a remote host-but take care to keep your private key a complete secret from the rest of the world.

Once you've generated your keys and uploaded your public key to a remote server, when you attempt to open an SSH connection to the remote host, the remote host will issue a challenge to your local client which can only be satisfactorily answered using your local host's private key. To use your private key, you are asked for the passphrase you entered when generating the key pair, and then the connection is established.

How is this more secure? As opposed to using a password which gains access to any machine from anywhere on the network, and which may or may not have been compromised, you may generate key pairs for each unique host from which you intend to establish a connection. Theoretically, your private key should not reside on a shared system (such as Hunter Creech), but if you manage your file permissions with due diligence, there should be no significant threat of compromise-if you trust your system administrator, that is.

The real benefit of this Public/Private Key model comes when managing data between accounts on separate networks (between PCSE and, say, Jefferson Lab) or when accessing your Hunter Creech account from your home machine. If you are interested in installing SSH on your machine at home, visit the SSH web site cited at the beginning of this document. Source code is available for download and compilation on UNIX systems, and binaries are also available for download for UNIX and Windows systems.


next up previous
Next: Generating SSH2 Key Pairs Up: Introduction to SSH Versions Previous: A simple SSH session
Michael S. Bland
2000-11-22