Comment 5 for bug 1586835

Revision history for this message
Michael Ambrus (ambrmi09) wrote :

Hi, thanks for the info in this thread. It lead me into a work-around that seems to work for me.

The scenario in my case: something is defining SSH_AUTH_SOCK but there's no ssh-agent running, despite use-ssh-agent being set in /etc/X11/Xsession.options. gnome-keyring-deamon is however running, where it's started is however unknown to me.

The reason seems different (opposite) but the ssh-behavior is the same: It's not possible to log-in with keys.

In my case I'm running unity and LightDM but have have a set-up where both unity, i3 and gnome has been VM/DM. I also still like to alter between VM:s as the machine is used by different users liking one or the other VM more.

What's possibly worsened it is that the system has not had a clean re-install since 8.04, i.e. it's always been upgraded. (Some-where along the way I believe recalling having issues with gnome-keyring and possibly making an effort to disable it.)

As I don't know where these environment variables are being set (not even SSH_AGENT_PID which in my case is unset), my workaround is to put the following line in /etc/bash.bashrc:

if [ "X$(ps -Al -u $USER | grep ssh-agent)" == "X" ]; then
    unset SSH_AUTH_SOCK
fi

I'd appreciate feed-back if there are serious drawbacks with this approach or if a better/right way to manage this exists. (One obvious drawbacks is that tweaks like this become obsolete whence the right solution is pushed by the distribution and may cause new issues whence upgrading/updating, which may be how I ended up here in the first pace).

Thanks