Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

What did Ubuntu 17.04 (Zesty Zapus) do to my ssh-agent?

Writer 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 directory

I 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.

0

1 Answer

This might help:

  1. Ensure that a reasonably up-to-date version of the OpenSSH SSH Agent is installed.

  2. 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/null
  3. Using GNOME Tweak Tool, go to "Startup Applications" and remove "Passwords and Keys".

  4. Add this to ~/.pam_environment:

    GSM_SKIP_SSH_AGENT_WORKAROUND DEFAULT=1
  5. Log out of the GNOME Desktop Environment (or, if needed, reboot).

After performing this workaround, running ssh-agent or ssh-add from GNOME Terminal should result in OpenSSH's SSH agent being invoked.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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