tomclegg.net |
Force gnome to use ssh-agent instead of gnome-keyring-daemon Posted March 31, 2009 ProblemFor some reason, ubuntu intrepid's gnome setup uses an SSH agent that is incapable of forgetting passphrases. This is a fatal flaw. It also has a strange bug that causes it to claim to have the use of a protected key, even if you have never given it your passphrase. Fortunately, the "ssh-agent" program we've been using for years is still here, and it still works very well. SolutionAdd this to the end of your if [ -n "$SSH_AUTH_SOCK" \ -a "${SSH_AUTH_SOCK::13}" = "/tmp/keyring-" \ -a ! -L "$SSH_AUTH_SOCK" ] then OLD_AUTH_SOCK="$SSH_AUTH_SOCK" eval `ssh-agent` mv "$OLD_AUTH_SOCK" "$OLD_AUTH_SOCK"~ ln -sfn "$SSH_AUTH_SOCK" "$OLD_AUTH_SOCK" SSH_AUTH_SOCK="$OLD_AUTH_SOCK" fi Everything in your gnome environment will now connect to your working ssh-agent instead of your broken gnome-keyring-daemon. Add your key to ssh-agent so you don't have to type your passphrase every time the key is used: ssh-add Forget passphrases so your passphrase-protected keys can't be used while you're away from your computer: ssh-add -d |