next up previous contents
Next: Creating a Key Up: Using SSH/SCP with Keys Previous: Using SSH/SCP with Keys   Contents

How it works: Keys and Agents

As it explains in info ssh:-

The scheme is based on public-key cryptography: there are cryptosystems where encryption and decryption are done using separate keys, and it is not possible to derive the decryption key from the encryption key. RSA is one such system. The idea is that each user creates a public/private key pair for authentication purposes. The server knows the public key, and only the user knows the private key. The file $HOME/.ssh/authorized_keys lists the public keys that are permitted for logging in. When the user logs in, the ssh program tells the server which key pair it would like to use for authentication. The server checks if this key is permitted, and if so, sends the user (actually the ssh program running on behalf of the user) a challenge, a random number, encrypted by the user's public key. The challenge can only be decrypted using the proper private key. The user's client then decrypts the challenge using the private key, proving that he/she knows the private key but without disclosing it to the server.

So to use the system you need two things:-

  1. A public/private key pair.

  2. An agent running locally that can answer the challenge on your behalf.


next up previous contents
Next: Creating a Key Up: Using SSH/SCP with Keys Previous: Using SSH/SCP with Keys   Contents
P.D. Gronbech (IT Staff) 2015-10-02