blob: 0e2360953ae7722d268a0689ab6456d6bcdecde5 (
plain)
1
2
3
4
5
6
7
8
|
# Starts the ssh-agent if it is not running, and either way it sources the required environment variables.
if [ -z "$(ps -e | grep ssh-agent)" ]; then
# ssh-agent does not seem to be running, start it
ssh-agent | sed -r '/echo Agent pid [0-9]+;/d' > ~/.sshsession
fi
eval $(<~/.sshsession)
|