Secure Shell
Can ssh add keys to ssh-agent? Mar 18 2009 12:26PM
rozelak volny cz (1 replies)
Re: Can ssh add keys to ssh-agent? Mar 20 2009 03:12PM
Jeff MacDonald (jam zoidtechnologies com) (1 replies)
On Wednesday 18 March 2009 08:26:30 rozelak (at) volny (dot) cz [email concealed] wrote:
> Hallo, I would like to ask a simple question. Please take my apologies
> it it has already been addressed, but I didn't find answer for it.
>
> I have key-based access to a ssh server (running openssh) and ssh-agent
> running. When I add the key to agent (ssh-add ...), everything works
> as expected without problems. I have also set 'IdentityFile = path_to_key'
> to that key in ~/.ssh/config. Now, when I use ssh and the key IS NOT
> added to ssh-agent, ssh asks for the password to the key and uses it
> for authentication. Still no problem. Also when I use e.g. subversion
> (using svn+ssh protocol) from command line, it (or the ssh) asks for
> the password to the key and again, uses the key for the authentication
> to the server.
>
> However, when I use sh or subversion again, it asks for the password
> to the key again; everytime I use it. It looks like:
>
[...snipped...]
> So, the question is: is there a possibility to configure ssh to
> automatically add the key to running ssh-agent, when the ssh recognises
> that key is required and checks that the password is OK (which ssh already
> does)? To behave it like:
[...snipped...]
>
> It would allow to use the key once it is needed, and even GUI-based apps
> could set it without the need to switch to console.
>

Yes, you can do this.. These days, my distro handles proper setup of ssh-agent
when I log in, but if you want to do it manually, you can. Simply change your
account startup so it runs "ssh-agent startx" instead of just "startx" (for
example).

You will still need to do the ssh-add when you first log in, but after that you
should be good.

>
> Tank you very much for your answer. Best regards,
> Dan

Regards,
Jeff

[ reply ]
Re: Can ssh add keys to ssh-agent? Mar 23 2009 09:36AM
rozelak volny cz (1 replies)
Re: Can ssh add keys to ssh-agent? Mar 23 2009 05:47PM
Hari Sekhon (hpsekhon googlemail com) (1 replies)
Re: Can ssh add keys to ssh-agent? Mar 24 2009 01:04PM
Greg Wooledge (wooledg eeg ccf org) (1 replies)
Re: Can ssh add keys to ssh-agent? Mar 24 2009 03:05PM
Hari Sekhon (hpsekhon googlemail com)


 

Privacy Statement
Copyright 2010, SecurityFocus