]> git.donarmstrong.com Git - home-base.git/commitdiff
* 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 06c0ab08c5248526ce70cc4b692b2ef1956eb1c5..c678d0b0ff6b309dd3eeb8694ebb17a7d63530f9 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -103,7 +103,8 @@ if [ "$PS1" ]; then
     fi;
 
     # set up ssh-agent
     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)" ] && \
 #      for 
        if [ -e ~/.ssh/ssh_agent_info ] && \
            [ -n "$(awk -F '[=;]' '/^SSH_AGENT_PID/{print $2}' ~/.ssh/ssh_agent_info)" ] && \