On 2015-11-24 13:10, Dmitry Bely wrote:
Hi Dmitry,
This way SSH_AUTH_SOCK is correct but SSH_AGENT_PID is surprisingly
unset somethere. Any idea how to fix that?
the PID is set via eval $(ssh-agent).
This is what I do:
[[ -s $HOME/.ssh-agent ]] || ssh-agent -s > $HOME/.ssh-agent
source $HOME/.ssh-agent 2>&1 >/dev/null
if [[ -z "$SSH_AGENT_PID" ]] || ! ps -fp "$SSH_AGENT_PID" | grep -q
ssh-agent; then
ssh-agent -s > $HOME/.ssh-agent 2>&1 >/dev/null
source $HOME/.ssh-agent 2>&1 >/dev/null
fi
if ! ssh-add -l | grep -q id_dsa; then
ssh-add $HOME/.ssh/id_dsa
fi
Cheers
Dirk
--
http://d5e.org/
_______________________________________________
x2go-user mailing list
x2go-user@lists.x2go.org
http://lists.x2go.org/listinfo/x2go-user