How to get a script file to use bash and ssh

Heath Kehoe hkehoe@budcat.com
Thu Sep 2 19:37:00 GMT 2010


  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@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@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@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



More information about the Cygwin mailing list