Currently I have to unlock may ssh key each session. How can I add ssh key password to my default gnome keyring?

  • Are you trying to log into a host through ssh without having to type in your password each time? – Terrance Mar 16 '18 at 22:30
  • I am using a ssh key, not a password to login to the remote server. But the ssh key is password protected. And I would like to put that password into gnome keyring, so it is unlocked automatically when the keyring is unlocked. – Jeno Mar 16 '18 at 22:35
  • Ah, that makes sense. I believe that you would import it into the GNOME2 Keyring. Unlock the GNOME2 Key Storage, then do File -> Import and put in your ssh rsa file. – Terrance Mar 16 '18 at 23:01
  • ehm, how? :) you can post it as an answer too – Jeno Mar 17 '18 at 10:10

Check if you have AddKeysToAgent yes option in your ~/.ssh/config.

Then if you have gnome-keyring-daemon and its ssh-agent running (and pointed to appropriate socket: the same as SSH_AUTH_SOCK env) then it should ask you "graphically" for passphrase at first use. There should also be a checkbox allowing you to "Automatically unlock this key whenever I'm logged in", which stores the passphrase in the "login" keyring and is exactly what you want. If it doesn't ask for unlocking passphrase with graphical requester, chances are that

$ ps ax | grep keyring

will show you that daemon or agent is not running. You can check if the agent is enabled in Startup Applications. On my machine it shows "SSH Key Agent" with description "GNOME Keyring: SSH Agent".

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.