From: Don Armstrong Date: Fri, 18 Sep 2009 21:03:28 +0000 (+0000) Subject: * only use ssh-agent if its a local connection X-Git-Url: https://git.donarmstrong.com/?p=home-base.git;a=commitdiff_plain;h=b811c87a017888727ca7fbba102a92fb2d67cf4e * only use ssh-agent if its a local connection --- diff --git a/.bashrc b/.bashrc index 06c0ab0..c678d0b 100644 --- a/.bashrc +++ b/.bashrc @@ -103,7 +103,8 @@ if [ "$PS1" ]; then fi; # set up ssh-agent - if which ssh-agent >/dev/null && [ -d ~/.ssh ]; then + if which ssh-agent >/dev/null && [ -d ~/.ssh ] && \ + [ -z "$SSH_CONNECTION" ] && [ -z "$SSH_CLIENT" ]; then # for if [ -e ~/.ssh/ssh_agent_info ] && \ [ -n "$(awk -F '[=;]' '/^SSH_AGENT_PID/{print $2}' ~/.ssh/ssh_agent_info)" ] && \