BAT script to execute commands on remote Unix machine with PuTTY
putty -i private_key.ppk remoteuser@remotehost -m local_script.bat
In the example above, I use public key authentication to authenticate and then execute the commands inside
local_script.bat on the remote machine. Alternatively, you can use
plink which is basically
putty without the GUI part. All other options are basically the same.
You can also use password for authentication, just replace
-i option with
-pw and your password.