Disable Gnome Keyring SSH Agent

Ubuntu Gnome Agent remembers SSH private key passwords until you log out. If someone knows an Ubuntu user password, they also have access to any SSH private keys loaded since last logon.

This also fixes error upon trying to use ssh or sshfs:

sign_and_send_pubkey: signing failed: agent refused operation

Permanently disable Gnome Keyring SSH Agent

  1. Edit /etc/xdg/autostart/gnome-keyring-ssh.desktop to include the line:

     X-GNOME-Autostart-enabled=false
    
  2. Reboot and test to be sure that your private key passwords aren’t being remembered.

Alternative disable Gnome Keyring SSH Agent method

  1. Edit /etc/xdg/autostart/gnome-keyring-ssh.desktop to include the line:

     NoDisplay=false
    
  2. Look in “Startup Applications” and uncheck “SSH Key Agent”
  3. Reboot and test to be sure that your private key passwords aren’t being remembered.

Tags:

Categories:

Updated:

Leave a Comment