delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Message-Id: | <4.3.2.7.2.20010608143713.0309de38@rpcp.mit.edu> |
X-Sender: | reagle AT rpcp DOT mit DOT edu |
X-Mailer: | QUALCOMM Windows Eudora Version 4.3.2 |
Date: | Fri, 08 Jun 2001 14:37:26 -0400 |
To: | cygwin AT cygwin DOT com |
From: | "Joseph M. Reagle Jr." <reagle AT MIT DOT EDU> |
Subject: | useful cygwin ssh-agent script |
Mime-Version: | 1.0 |
This is n generations tweaked, but it's now useful for me under any of my *nix hosts. Previously on win32 I was doing all kinds of nasty stuff with setx to push these variables into the global NT environment space, but the file approach is much simpler. (However, people should be cognizant of the potential dangers of ssh-agent under cygwin [1], though under a local netstat and remote portscan it does not appear that the port specified in /tmp/ssh-foo is accessible to anyone ...?) [1] http://www.cygwin.com/ml/cygwin/2001-01/msg00063.html SSH_ENV=$HOME/.ssh/environment function start_agent { echo "Initialising new SSH agent..." /usr/bin/ssh-agent | sed 's/^echo/#echo/' > ${SSH_ENV} echo succeeded chmod 600 ${SSH_ENV} . ${SSH_ENV} > /dev/null /usr/bin/ssh-add; } # Source SSH settings, if applicable if [ -f "${SSH_ENV}" ]; then . ${SSH_ENV} > /dev/null #ps ${SSH_AGENT_PID} doesn't work under cywgin ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || { start_agent; } else start_agent; fi -- Regards, http://www.mit.edu/~reagle/ Joseph Reagle E0 D5 B2 05 B6 12 DA 65 BE 4D E3 C1 6A 66 25 4E MIT LCS Research Engineer at the World Wide Web Consortium. * This email is from an independent academic account and is not necessarily representative of my affiliations. -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |