Created attachment 2396 [details] IdentityPersist patch Background: I want to add an identity to an authentication agent automatically when I load the identity. Gnome-keyring has such a feature by using a modified ssh-agent, but I don't want to run the gnome-keyring's agent only for this feature. Specification: I propose to add two options called IdentityPersist and IdentityPersistConfirm to accomplish this feature. IdentityPersist can take a boolean value or a time value like: # keep identities forever IdentityPersist yes # keep identities for 5 minutes IdentityPersist 300 If the value is true or a time, then ssh-agent will try to add an identity to itself automatically when the identity is being loaded. If the time value is given, ssh-agent will forget the identity in seconds the value specified. The default value is false. IdentityPersistConfirm can take a boolean value. If the value is true, then ssh-agent will confirm to an user that the identity should be added or not. The default value is false. Implementation and test: I have attached a patch. It's a tiny change, so you can read the modification in few minutes. I have tested on Debian/GNU Linux 7.0. I have also checked the patch doesn't break a build on Debian/GNu Linux 7.0 and OpenBSD 5.4.