Sunday, September 24, 2006

Linux:: Use of ssh-agent

You often connect remotely by using ssh… and you are fed up of always having to enter your password: ssh-agent is made for you. ssh-agent is a daemon whose only goal is to keep in memory (in a protected way) the “passphrase” so that it is not necessary to type it with each use of ssh.
The following order creates the variable SSH_AUTH_SOCK which contains the way of a socket that ssh, SCP (and other orders) will use to dialogue with ssh-agent:
$ ssh-agent

To communicate the private key and the sentence of master key to ssh-agent by means of ssh-add:
$ ssh-add ~/.ssh/id_rsa
Enter the passphrase for /home/user/.ssh/id_rsa:

The private key is thus deciphered and stored in the mask of ssh-agent, lends to being used

One can now use ssh and SCP without having to enter the password.

No comments: