When you want to execute Linux/Unix shell from windows, you definitely will think of putty, which can help you log in to Linux/Unix server and execute shell. But if you need an auto-run job to do that for you, putty does not work, Cygwin might work. Recently in my project, I found another simple way to execute Linux/Unix shell in my auto-run job.
It is another usage of WinSCP. Many know WinSCP is a good SFTP tool for file transfer, it also has command line mode to help you automate your call to Linux/Unix.
Install WinSCP first, go to command line and execute below command: @winscp.com /console /command “option batch continue” “option confirm off” “open username:password@yourserver” “call date” “exit”. It helps you to execute “date” at your server with authentication all in command mode. Is that simple?
Advance skill, use below sample command to make complex script execution, winscp.com /ini=”profile.ini” /console /script=commandscript.txt ProfileName
By using WinSCP, it is easy and simple to complete automation job execution from windows to Linux/Unix.
For more details, go to WinSCP website.