Ubuntu – What could be the reason, that private keys are not unlocked

17.10passwordseahorsesshssh-agent

Since I updated to Ubuntu 17.10 a while ago, my private keys – the which I use for example to access my server via ssh – are not unlocked programmatically after login anymore.

enter image description here

My understanding is, that usually the seahorse client should take care of this, by asking you whether or not to store the key's password when typing them in for the first time.

My first guess was, that seahorse-daemon wasn't running for some reason, but it is:

user@Zeus:~$ ps aux | grep seahorse
user    19170  0.0  0.1 432636 26564 ?        Ss   00:07   0:00 seahorse-daemon

My second guess was, that for some reason I have to delete all related passwords stored in seahorse under »Passwords->login«:
enter image description here

I was hoping to force the client to ask me again and then storing them again. But this didn't help either. The client does not pop up to ask me…

Then I found this question, which could be related, but did not help me:
Unlock all private keys on Ubuntu, entering password only once at login

As the management of other passwords work as expected (for example passwords for nautilus, Chromium, Nextcloud etc.) I assume the problem has to do something with ssh-agent

Can anybody hint me in the right directions, how to solve this problem? Has anything changed in the way how GNOME handles passwords? Maybe some new fancy program failed being installed during the upgrade process?

UPDATE
When I add the private key to the authentication agent again with:

ssh-add ~/.ssh/id_rsa

and try to log in, I will be asked to unlock the key only once, after that the key gets unlocked programmatically. But this works only until the next reboot. After a fresh start, I have to add the key again…

Best Answer

Yes, ssh-agent is the answer. To save the passphrase, all you have to do is:

ssh-add ~/.ssh/id_rsa

Then put in your password, and log back in.