]> git.donarmstrong.com Git - home-base.git/blobdiff - .bashrc
* only use ssh-agent if its a local connection
[home-base.git] / .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
-    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)" ] && \