Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

On my local PC my ssh keys are automatically unlocked on login. From there I access via ssh (with key authentication) a server that have stored the same keys I have in the client. I'd like to unlock those keys in the server as well without having to digit the passphrase.

Is there a way to automatically unlock the keys in the remote host after a succesfull SSH login?

share|improve this question
    
If your keys are unlocked at login, it means that some program has stored their password, presumably Gnome-keyring or Kwallet. What desktop environment do you use? –  Gilles Apr 28 '13 at 20:44
    
@Gilles gnome-keyring is unlocking the keys (I use XFCE). Is this relevant? –  ntd Apr 29 '13 at 6:19
add comment

2 Answers 2

up vote 4 down vote accepted

You probably want to unlock private keys on your server to access different machines from there using these keys. Since these are the same keys as on your local machine, there is an easier way than unlocking those, by using ssh key forwarding. This concept is described here in the section ' Public Key Access with Agent Forwarding'.

From the commandline invocation of ssh you can use the '-A' option, or e.g. for openssh you can set the

'ForwardAgent Yes'

in your configuration file '~/.ssh/config'

share|improve this answer
    
It works! And I don't need to keep the keys in the remote host too. Many thanks Anthon, I owe you one. –  ntd Apr 29 '13 at 6:46
add comment

You may want to play with Keychain.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.