To run a shell script in remote server from windows batch file

Hi all,
i need to run a shell script on remote server. I have created file .bat file in windows server with following code,

 
c:\Users\Desktop\putty.exe -ssh -pw password user@server ./script.sh

i need to run the script.sh in my remote server

Above command is not working, any help??

What is not working? Post results, error msgs, etc.

 c:\Users\Desktop\putty.exe -ssh -pw password user@server ./script.sh 

when i execute the above command it is giving error as

Network error : cannot assign requested address.

but the code,

 c:\Users\Desktop\putty.exe -ssh -pw password user@server 

is working i.e it results in opening the shh to that server.

i need to execute the script.sh in the above remote server.

Perhaps try using plink.exe instead. Explanation and examples are here.

Agreed, putty is bad at automating, which is why the same people made plink, which is designed with that in mind.