Using SSH Agent

From CS Support
Jump to: navigation, search

Using ssh-agent and ssh-add to manage keys in Unix/Linux

While SSH keys allow for a more secure connection they still do not resolve the problem of having to enter a password for your public/private key each time you want to ssh into a system. ssh-agent and ssh-add solve this problem by decrypting the key and storing it in memory so that the user only needs to type in his/her password once.

Step 1 Starting ssh-agent

The following commmand will start ssh-agent

  1. eval $(ssh-agent)

Step 2 Add keys to ssh-agent

ssh-add will add the default key (id_dsa) and keep the passphrase stored in memory so that you dont have to keep typing it.

  1. ssh-add

ssh-add will ask you for your password and store it for as long as you are logged in.