Launch Linux Script remotely from Windows
6,400
You should do it via a SSH command. You just need to setup plink.exe . You can download it at:
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
Then, from a batch file like this one, exectute it:
@ECHO off
:: run remote command
plink.exe username@myserver /cygwin/C/Users/username/do-backup.sh
ECHO Remote command finished...
PAUSE>nul
Related videos on Youtube
Author by
Kashif
Updated on September 18, 2022Comments
-
Kashif over 1 year
I have an
rsync
script that runs on one Linux server to synchronize files with another Linux server. Is there a way to launch a script on one of the Linux machines without actually opening an interactivessh
session to the server? -
Kashif about 12 yearsbut I'm looking to make a batch file or something like that, that will login into my linux bux and run that script... so it is possible by using Cywgin?
-
Tim about 12 yearsYes. Bash in Cygwin is nearly the same as bash under any *nix.
-
Kashif about 12 yearsactually I'm not looking to automate this command. I'm looking to make it manual but then it should automatically login to server and run script. Actually I need rsync on different times so i want to keep it under my control to get rsycn whenever i want without going to server.
-
dmars about 12 yearsThen you just need to put it the line in a batch script as djangofan wrote and run the script when needed.