Comment Easier way? (Score 2, Informative) 109
Here's my .xsession. Works on Red Hat Linux, and needs ssh-askpass-gnome installed.
#!/bin/sh
if [ ! "$SSH_AGENT_PID" ]; then
exec ssh-agent $0
else
ssh-add
exec
fi