[Lunar-commits] CVS: moonbase/kde3-apps/lincvs start-ssh.sh, 1.1, 1.2

Steven Michaelske hardkrash at lunar-linux.org
Tue Jan 20 20:07:42 GMT 2004


Update of /var/cvs/lunar/moonbase/kde3-apps/lincvs
In directory dbguin.lunar-linux.org:/tmp/cvs-serv18006

Modified Files:
	start-ssh.sh 
Log Message:
added support for already running ssh-agents


Index: start-ssh.sh
===================================================================
RCS file: /var/cvs/lunar/moonbase/kde3-apps/lincvs/start-ssh.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- start-ssh.sh	10 Jan 2004 13:36:31 -0000	1.1
+++ start-ssh.sh	20 Jan 2004 20:07:40 -0000	1.2
@@ -9,4 +9,11 @@
 #
 
 export SSH_ASKPASS=/usr/libexec/ssh-askpass
+
+# The following commands allow the ssh that is called to use a running ssh-agent for keys
+# improvents may be made to this to have a ssh-agent started if one is not running
+export SSH_AGENT_PID=`ps --user $UID -o pid=,comm= | grep ssh-agent | grep -v grep | sed "s/^ //" | cut -d" " -f 1`
+export SSH_AGENT_PPID=`ps --pid=$SSH_AGENT_PID  -o ppid="" | sed "s/ //"`
+export SSH_AUTH_SOCK=`find /tmp/ssh-* -name "agent.$SSH_AGENT_PPID"`
+
 ssh "$@"



More information about the Lunar-commits mailing list