help me to write a windows batch script?

Hi All,

I need to write a small batch script in windows 7 ... which in turn call a shell script in the linux server please...please help me to do achieve this scenario ?



Besides that i know the static IP address of the linux server ... i.e. 54.191.74.256



Besides that i know the static IP address of the linux server ... i.e. 54.191.74.256



your best bet is going to be to download a command line ssh client for windows: http://sshwindows.sourceforge.net/download/

Once it's installed, you can create a batch file to run ssh in
Program Files (x86)OpenSSHbinssh

you can run commands via SSH from the windows command line. Keep in mind that if you don't put the path to SSH in your path environment variable, you will need to include the entire path in the command for the batch file:



Use putty and define a profile for your linux server, set on "Connection"->"SSH"->"Remote command" the path to your shell script.

Then call, from command prompt or a desktop shortcut
x:pathtoputty.exe -load sessionname

PS: I would advise you use a certificate to authenticate to your ssh server.

HTH,
Dan



Thank you



Share this

Related Posts

There was an error in this gadget