set sshAgent=/usr/bin/ssh-agent set tmpFile=exportAgentEnv if ( -x "$sshAgent" ) then if ( ! $?SSH_AUTH_SOCK ) then $sshAgent | head -2 > $tmpFile source $tmpFile rm $tmpFile echo "ssh agent started [${SSH_AGENT_PID}]" endif endif