next up previous contents
Next: About this document ... Up: Appendix A : Using Previous: using Secure Copy (scp)   Contents


using ssh-agent

You can use ssh-agent so that you only need to type in your passphrase once during a session. E.g if you are logged into a local machine you will only need to enter the passphrase once.

Subsequent logins using ssh or scp will not ask you for a passphrase. Once you logout of the local shell window the ability to login to the remote server without a passphrase is cancelled.

To use this facility simply type:

ssh-agent $SHELL
ssh-add
You will be prompted for the passphrase. After this you can start any number of xterm sessions and they will inherit the knowledge of the passphrase. For example:
[nrcb@mypc]$ ssh-agent $SHELL
[nrcb@mypc]$ ssh-add
Need passphrase for /home/nrcb/.ssh/identity (nrcb@mypc.streamline.com).
Enter passphrase: 
Identity added: /home/nrcb/.ssh/identity (nrcb@mypc.streamline.com)
[nrcb@mypc]$ xterm &
[1] 3118
[nrcb@mypc]$ xterm &
[2] 3177
[nrcb@mypc]$ ssh vmserve
Last login: Thu Mar  1 05:40:39 2001 from mypc.streamline.com
You have mail.
[nrcb@vmserve nrcb]$
You will also find that you can also login to the remote server without a passphrase from the xterminals that were started inside the original shell window.



2004-06-17