Re: Can ssh add keys to ssh-agent?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 18 March 2009 08:26:30 rozelak@xxxxxxxx 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


[Index of Archives]     [Open SSH Unix Development]     [Fedora Users]     [Fedora Desktop]     [Yosemite Backpacking]     [KDE Users]     [Gnome Users]

  Powered by Linux