Am Mi, den 21.12.2005 schrieb Jay Leafey um 20:17:
I recently noticed a LOT of ssh-agent processes running on my system (CentOS 4.2). It seems that the ssh-agent gets started before the session manager (in /etc/X11/xinit/xinitrc-common) which is great. The only problem is that the agent process does not die when the session shuts down.
I run ssh-add in my session startup to get my key loaded into ssh-agent, so that might be part of the issue.
That is the cause of what you describe.
I just haven't been able to figure out where to kill the beast. Is there somewhere I can run an arbitrary program when the session manager runs down? A medium-intensity search of the docs and sourcecode didn't turn up anything applicable. Plenty of ways to run programs at session START, but not at the end. Anybody got any ideas?
Use "keychain" for more flexibility in loading and handling ssh keys with ssh-agent.
http://centos.karan.org/el4/extras/stable/i386/RPMS/repodata/repoview/keycha...
Alexander