3

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?

  • 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 'SO- stop being evil' 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
4

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'

  • 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
1

You may want to play with Keychain.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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