What did Ubuntu 17.04 (Zesty Zapus) do to my ssh-agent?
Sebastian Wright
I just upgraded my Ubuntu 16.10 install to Ubuntu 17.04 and have found that I no longer have a working ssh-agent:
$ ssh-add my_rsa_key
Error connecting to agent: No such file or directory
$Upon minimal investigation, I see that SSH_AUTH_SOCK is set to something that doesn't appear to make sense:
$ env | grep SSH
SSH_AUTH_SOCK=/run/user/1000/openssh_agent
SSH_AGENT_LAUNCHER=openssh
$I don't know what is responsible for /run/user/1000/openssh_agent but it's not working on my system:
$ ls /run/user/1000/openssh_agent
ls: cannot access '/run/user/1000/openssh_agent': No such file or directoryI had a working ssh-agent on Ubuntu 16.10 after I added eval $(ssh-agent) as a "startup application". This is still present and there is an ssh-agent running but I don't appear to have the correct agent env vars set anymore.
1 Answer
This might help:
Ensure that a reasonably up-to-date version of the OpenSSH SSH Agent is installed.
Add this to
~/.bashrc:if ! pgrep -u "$USER" ssh-agent > /dev/null; then ssh-agent > ~/.ssh-agent-thing fi eval "$(cat ~/.ssh-agent-thing)" >& /dev/nullUsing GNOME Tweak Tool, go to "Startup Applications" and remove "Passwords and Keys".
Add this to
~/.pam_environment:GSM_SKIP_SSH_AGENT_WORKAROUND DEFAULT=1Log out of the GNOME Desktop Environment (or, if needed, reboot).
After performing this workaround, running
ssh-agentorssh-addfrom GNOME Terminal should result in OpenSSH's SSH agent being invoked.