X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org X-VirusChecked: Checked X-Env-Sender: hkehoe AT budcat DOT com X-Msg-Ref: server-2.tower-190.messagelabs.com!1283456208!90502484!1 X-StarScan-Version: 6.2.4; banners=budcat.com,-,- Message-ID: <4C7FFCCE.7040207@budcat.com> Date: Thu, 02 Sep 2010 14:36:46 -0500 From: Heath Kehoe User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.4) Gecko/20100608 Lightning/1.0b2 Thunderbird/3.1 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: How to get a script file to use bash and ssh References: <29608117 DOT post AT talk DOT nabble DOT com> In-Reply-To: <29608117.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 9/2/2010 2:10 PM, PaulHR wrote: > I want to create script files that are not bound to my user id. I want to > create over 20 different scripts files, one for each server I manage. I > have uploaded keys to each server. So all I should have to is enter is the > ssh command.... > > > I have put in a file called MyOpenUp.bat the following... > > ++++++++++++++++++++++++++++++++++++++++ > > ssh {myServerId AT MyServerHostname} > > ++++++++++++++++++++++++++++++++++++++++ > > > I have put that command in a file called MyOpenUp.init > > > I have created a MyOpenUp.bat file with the following.... > > ++++++++++++++++++++++++++++++++++++++++ > > @echo off > > > C: > > chdir C:\cygwin\bin > > bash --init-file MyOpenUp.init -i -l > > ++++++++++++++++++++++++++++++++++++++++ > That's all more complicated than it needs to be. Just make windows shortcuts to c:\cygwin\bin\ssh.exe, where "Start in:" is set to c:\cygwin\bin, and modify "Target:" to contain "C:\cygwin\bin\ssh.exe username AT hostname" (without the quotes of course). Better yet, install mintty if you don't already have it, and set the shortcuts' target to: "C:\cygwin\bin\mintty.exe -e /bin/ssh username AT hostname" (Mintty is a much better term window than cmd.) -heath ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple