# This is a useful snippet to stick in your ~/.cshrc (assuming you use a # csh-like shell) which auto-populates the SSH_AUTH_SOCK env variable with the # path to your ssh-agent socket, assuming ssh-agent is running already. # If you run X, use your .xsession file if (${?SSH_AUTH_SOCK} != "1") then setenv SSH_AUTH_SOCK `sockstat | grep ${USER} | grep ssh-agent | awk '{print $6}'` endif # If you run X, use your ~/.xsession file to start your window manager via # ssh-agent which then sets SSH_AUTH_SOCK in the environment of all processes # started during your X session. To make your X login manager read .xsession, # you may have to tweak it's config. KDM for example, you must choose the # "Custom" session type in order to run you .xession commands. exec /usr/bin/ssh-agent -t 14400 /usr/local/kde4/bin/startkde