1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

Improve SSH-agent session management for chained connections

This commit is contained in:
Joe Groocock 2016-10-05 00:10:48 +01:00
parent 30cb9e69dc
commit 0f0043ac08

View File

@ -21,7 +21,9 @@ if ! [ -z $DISPLAY ] && which autocutsel &>/dev/null; then
autocutsel -selection PRIMARY -fork & autocutsel -selection PRIMARY -fork &
fi fi
# Start an ssh-agent
if [ -z $SSH_AUTH_SOCK ]; then if [ -z $SSH_AUTH_SOCK ]; then
eval `ssh-agent` eval `ssh-agent`
ssh-add
fi fi
# Always add SSH key to the running agent; local or remote
ssh-add