Can't get rid of Gnome SSH Agent

When I type in a terminal git -T [email protected] the dialog with the title "Unlock private key" appears with password entry field.

I guess it is Gnome Keyring SSH Agent, and I would like not to use it but to use instead ssh-add command to add keys.

I edited /etc/xdg/autostart/gnome-keyring-ssh.desktop but that didn't help. In "Startup Applications" settings it looks as disabled.

  1 [Desktoktop Entry] 
  2 Type=Application 
  3 Name=SSH Key Agent 
  4 Comment=GNOME Keyring: SSH Agent 
  5 Exec=/usr/bin/gnome-keyring-daemon --start --components=ssh 
  6 OnlyShowIn=GNOME;Unity; 
  7 X-GNOME-Autostart-Phase=Initialization 
  8 X-GNOME-AutoRestart=false 
  9 X-GNOME-Autostart-Notify=false 
 10 X-GNOME-Bugzilla-Bugzilla=GNOME 
 11 X-GNOME-Bugzilla-Product=gnome-keyring 
 12 X-GNOME-Bugzilla-Component=general 
 13 X-GNOME-Bugzilla-Version=3.2.2 
 14 NoDisplay=false 
 15 X-Ubuntu-Gettext-Domain=gnome-keyring 

Finaly how can I disable Gnome SSH Agent?


Solution 1:

If you don't want to run the autostart file for ssh-agent, just add:

Hidden = true

to it's .desktop file in either /etc/xdg/autostart or in ~/.config/autostart

If you aren't the only user of the system, you might want to copy the .desktop file to ~/.config/autostart and set the Hidden entry in there. It should override the system wide setting for your user account, if the standard is respected.

The Gnome documentation also explains how to use ssh-add with the gnome-keyring, just note that the section about gnome-session-properties is outdated, as that utility is deprecated and removed from recent versions.

I would also consult the man page for ssh-add to understand what exactly it does.

Btw, I did a little research into the gnome extensions to the desktop entry standard.