* only use ssh-agent if its a local connection
authorDon Armstrong <don@donarmstrong.com>
Fri, 18 Sep 2009 21:03:28 +0000 (21:03 +0000)
committerDon Armstrong <don@donarmstrong.com>
Fri, 18 Sep 2009 21:03:28 +0000 (21:03 +0000)
.bashrc

diff --git a/.bashrc b/.bashrc
index 06c0ab0..c678d0b 100644 (file)
--- 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)" ] && \