1

My work computer is a painfully out of date Ubuntu 16.04 machine. I have it configured such that that lightdm invokes ssh-agent (not gnome-keyring-daemon) and ssh-agent invokes my session. This is not too dissimilar to how I have my personal laptop configured, except there I use Arch and use login on a tty instead of lightdm. My .xinitrc invokes ssh-agent which invokes my window manager. In the end, in both cases, X has been started in an environment that is a child process of ssh-agent, so every shell gets the SSH_AUTH_SOCK environment variable.

The odd thing about my work computer is that when I switch networks (either one WiFi network to another or wired <-> WiFi) there is a high probability that ssh-agent will terminate and my session's process will get reparented. This is super frustrating because I can't easily start a new ssh-agent and reparent my session under it - I have to log out and back in again.

I have not found any log messages containing ssh-agent or even agent in the systemd journal nor dmesg. The only debugging options ssh-agent seems to have is the -d option to run it in the foreground, I have not tried that yet because it is invoked by lightdm and I don't know if I would even be able to see the output.

Are there any debugging steps or known issues I should be aware of with the ssh-agent from openssh-client 1:7.2p2-4ubuntu2.2 ?

  • It seems like ssh-agent is running as a child process of something that stops when you switch networks. How are you determining it has stopped? – Deathgrip Jun 7 '17 at 20:03
  • When attempting to SSH to another host, the SSH_AUTH_SOCK environment variable is referenced to obtain credentials. It points to a socket file that no longer exists because the process that created the socket (ssh-agent) is no longer running. – Huckle Jun 8 '17 at 1:46
  • @Deathgrip just after login the direct parent process of ssh-agent is systemd(1), so the parent process of ssh-agent is not dying. – Huckle Jun 8 '17 at 2:15

Your Answer

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

Browse other questions tagged or ask your own question.