Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'An even faster hint for using ssh' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An even faster hint for using ssh
Authored by: sreilly on Apr 29, '01 01:36:58PM

You can also use the ssh-agent program so that you can enter your
RSA key passphrase once and never have to enter it again (until you
reboot, at least). The ssh-agent program runs in the background
and keeps track of your passphrase. When you ssh to another machine,
ssh checks with the ssh-agent program to see if your RSA private key
is available. If so, it uses it to authenticate with the remote host
and logs you in without ever having to enter a password.

Note: This only works with RSA authentication (which is more secure
than normal secret key authentication anyway, so everyone should
use it!)

There are many different ways to set this up. I did it like this:

1) Add the following two lines to the .cshrc file in your home folder:
alias setupssh 'ssh-agent | head -2 > ~/.ssh_settings ; source ~/.ssh_settings ; ssh-add'
source ~/.ssh_settings

2) When you first login, or start the computer, at the command-line run:
setupssh

It will start the ssh-agent program in the background and (if you have generated
an RSA public/private key pair) will ask you for your private key passphrase.
If you enter your passphrase you will be able to ssh to any computer that
has your RSA public key without re-entering your passphrase.




[ Reply to This | # ]