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
sign_and_send_pubkey: signing failed: agent refused operation
Permanently disable Gnome Keyring SSH Agent
/etc/xdg/autostart/gnome-keyring-ssh.desktopto include the line:
Reboot and test to be sure that your private key passwords aren’t being remembered.
Alternative disable Gnome Keyring SSH Agent method
Edit /etc/xdg/autostart/gnome-keyring-ssh.desktop to include the line:
- Look in “Startup Applications” and uncheck “SSH Key Agent”
- Reboot and test to be sure that your private key passwords aren’t being remembered.