From 8f8a1686b89ebe872a254b132738ceb85a800220 Mon Sep 17 00:00:00 2001 From: Changwoo Park Date: Fri, 28 Oct 2011 19:51:44 +0900 Subject: [PATCH] fix to avoid other's ssh-agent --- plugins/available/ssh_agent.plugin.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/available/ssh_agent.plugin.bash b/plugins/available/ssh_agent.plugin.bash index 83a012fd..f085b744 100644 --- a/plugins/available/ssh_agent.plugin.bash +++ b/plugins/available/ssh_agent.plugin.bash @@ -8,7 +8,7 @@ function get_ssh_agent_timeout(){ } function bind_ssh_agent(){ - local agent_pid=`ps -ef | grep ssh-agent | grep -v grep | awk '{print $2}' | xargs` + local agent_pid=`ps -U $USER | grep ssh-agent | grep -v grep | awk '{print $1}' | xargs` if [ "$agent_pid" = "" ]; then ssh-agent -t $(get_ssh_agent_timeout) > ~/.ssh/ssh_agent_rc