From b811c87a017888727ca7fbba102a92fb2d67cf4e Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Fri, 18 Sep 2009 21:03:28 +0000 Subject: [PATCH] * only use ssh-agent if its a local connection --- .bashrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)" ] && \ -- 2.39.2