On Tuesday 12 May 2009, 06:35, Hilco Wijbenga wrote:

> This works for me too but afterwards the key is completely ignored.
> What happens if you do this and then restart the shell? Or better yet,
> what happens if you logout completely and then log back in? For me,
> the RSA key is completely ignored.

The way ssh-agent is designed is to NOT survive after the shell it was 
started from is closed. That's why you should invoke it during your very 
first login shell, so that the variables it sets are exported to all 
child programs and subshells. If you do graphical login, I believe 
there's an equivalent tool that lets you run the agent from the parent 
environment.

One way of doing that is to put its invocation in .bashrc, but then it 
will run a new copy each time a new login shell is started. So tools 
like keychain have been developed which run ssh-agent, ask for the 
password, and on subsequent invocations check if the agent is already 
running, and if so they don't ask for the password again.
There's a nice article on keychain here:

http://www.gentoo.org/proj/en/keychain/

> Does ssh-agent really ask you for a passphrase when starting a shell?

Not if you don't invoke it :)

> Or at least list the RSA key? For me it's only the DSA key that is
> listed by ssh-agent (when it starts) and it's only for the DSA key
> that ssh-agent asks for a passphrase. Note, that ssh-add -L still
> lists the RSA key too!

As far as I know, as soon as ssh-agent is started, it has no keys. It's 
your job (or keychain's) to add keys to ssh-agent's cache. But I'm not 
sure I understand what you're getting.

Reply via email to