# running a script remotely?

## jsteinmetz75

So I've trolled on here for a few years, but never asked/answered much.  I'm mostly on here looking things up - should be able to start answering some questions soon enough.  

I've been learning linux for quite some time now, and have recently come up with a problem I have not been able to figure out.  I have a script that I need to run on my home file server from my workstation at the office periodically, and I'm stuck with WinXP at work (ugh).  I am currently using PuTTY to log in and run the command, but is there a way I can set it up so that when I ping a specific port (or something like that), it can run the script for me?  I could easily set up a shortcut to send a ping to the port, and run it quickly, instead of taking 10 minutes logging in and running the script manually every time.

Any ideas?

----------

## msalerno

Here's a secure way to do what you need.  Might be a little more complicated than what you are looking for, but it works.

http://cipherdyne.org/blog/2009/11/creating-ghost-services-with-single-packet-authorization.html

http://cipherdyne.org/fwknop/

Other options would be using a batch script with plink to automate the process on the winxp side, or webmin.

----------

## xaviermiller

do you mean a cron job ?

----------

## msalerno

Good point, do you need to execute this script on demand or on a schedule?

----------

## xaviermiller

if it is on demand, you can for example run some socket listener, a inetd daemon, or some php script hosted by an apache server.

----------

