Feature changed by: Torsten Foertsch (tfoertsch) Feature #312649, revision 3 Title: Automatically add keys to the ssh-agent at X11 login openSUSE Distribution: Unconfirmed Priority Requester: Desirable Requested by: Torsten Foertsch (tfoertsch) Partner organization: openSUSE.org Description: I'd like to have a simple way to have the ssh-agent load a number of keys automatically when I log in to the system. The simplest way in my opinion would be a directory, say ~/.ssh/ssh-add/, where the user can copy all the keys he wants to add. Currently ssh-agent is already started when the user logs in using X11 by /etc/X11/xdm/sys.xsession. /etc/X11/xinit/xinitrc which runs a bit later also executes scripts in /etc/X11/xinit/xinitrc.d/. To me this seems the perfect place to add a small script containing the following lines: =================================================== #!/bin/bash if test -S "$SSH_AUTH_SOCK" -a \ -x "$SSH_ASKPASS" -a \ -d ~/.ssh/ssh-add; then ssh-add ~/.ssh/ssh-add/* < /dev/null fi =================================================== In fact, I use this script for a few years now. And I am sick of adding it to /etc/X11/xinit/xinitrc.d/ after each distribution update. Discussion: #1: Andreas Jaeger (a_jaeger) (2011-07-19 10:43:38) You can easily have your own ~/.xinitrc file with the above change. Just copy it and edit it. + #2: Torsten Foertsch (tfoertsch) (2011-07-20 10:11:04) (reply to #1) + I know that. I had one in the past. Then with a distribution update it + suddenly ceased to work and caused quite a bit of debugging. I think is + was when Suse decided to activate either gpg-agent or ssh-agent. To + prevent similar cases in the future I requested the feature. -- openSUSE Feature: https://features.opensuse.org/312649