4

On Loki with latest updates. I used to get the normal dialog which prompts for your password on the first attempt and then keeps the key unlocked, however for some reason this no longer works.

Enter passphrase for key '/home/stan/.ssh/id_rsa':

ssh-agent is running.

EDIT: To be clear, not sure exactly when/after what event it started happening, I don't think it has anything to do with OS updates.

Updates

My /etc/X11/Xsession.d directory

00upstart                       55numlockx                70im-config_launch      95dbus_update-activation-env
20x11-common_process-args       60x11-common_localhost    75dbus_dbus-launch      99upstart
30x11-common_xresources         60x11-common_xdg_path     90atk-adaptor           99x11-common_start
35x11-common_xhost-local        60xbrlapi                 90gpg-agent
40x11-common_xsessionrc         60xdg-user-dirs-update    90qt-a11y
50x11-common_determine-startup  70gconfd_path-on-session  90x11-common_ssh-agent

Strangely, gnome-keyring-d has two running instances:

2543 ?        00:00:19 gnome-keyring-d
10165 ?        00:00:00 gnome-keyring-d
  • Did you add the key to the agent? ssh-add -l? – Jakuje Jan 25 '17 at 12:42
  • Thanks for the response. Why would I need to? It used to just work. Seems to be something with ssh-agent, but not sure. I start ssh-agent (eval ssh-agent -s) add the key, and things work in that terminal session. It used to do what most modern distros do, and allow you to unlock the key for the whole login session (without you having to do anything to set that up) - will probably just recreate my key without a password – Stan Bondi Jan 25 '17 at 12:57
  • Then it was gnome-keyring/seahorse. Do you have it installed and set up? If you want to have it working in your whole login session, you need to run the agent before running the login session (some .Xsession) scripts. – Jakuje Jan 25 '17 at 12:59
  • Care to submit an answer? :) – Stan Bondi Jan 25 '17 at 13:57
  • I have same question. This question don't have working solution yet – Alex0007 Aug 17 '17 at 21:03
2

What you were using before was most probably gnome-keyring/seahorse, which is automatically starting with the system, loading your keys and offering them to the ssh.

Regardless agent/keyring, it should start before your graphical session so all the other terminals and apps will see the authentication socket for the agent. This is usually set up in the .XSession in your home directory or system-wide.

Script 90x11-common_ssh-agent should somehow start your ssh-agent. But not add the keys. If you want to add a key with the first usage, you can configure ssh to do so in ~/.ssh/config:

AddKeysToAgent yes
  • Think you are on the right track. Still no idea what's wrong. See update, I'm using gnome-keyring – Stan Bondi Jan 26 '17 at 8:14
  • Aaah, that worked! Interesting why that just broke on the system. Does .ssh/config even exist on a fresh install? Anyways, big thanks! – Stan Bondi Jan 26 '17 at 8:49
  • No. It does not. But the system-wide configuration is in /etc/ssh/ssh_config, which could have this configuration (but AFAIK does not have). – Jakuje Jan 26 '17 at 9:34
  • The global ssh_config doesn't have AddKeysToAgent, and since the default is 'no' it's weird that it used to work. – Stan Bondi Jan 26 '17 at 11:51

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.