Tricky little problem, send signal to other machine without user

Hi everyone! I want to be able to send a signal to another machine on the same network, and have it trigger a script on that machine. Here's the reason why I can't just ssh: I don't have a username on that machine, but there is a user that is always logged on that I can do stuff on.

So, I want to have a script constantly running in the background on that machine, and from mine, essentially ping it, and have it run another script. I'm not really sure how to do this...I know the IP address of the machine I want the script on, so I was looking into using something called netcat (man nc).

Does anyone have any advice or suggestions?

Thanks!

So why not have the script on the machine that actually runs it check on the first machine for the existence of a file. That way you don't have to push data, the second machine can pull the data. You only have to give the second machine permission to read files on your system.

Hmmm, that's not a bad idea. But I'd like a fast response time. Would it be hard to make it check about once a second?

That would work pretty well because I have a user on this machine.

Once a second is a bit much. It's easy to say a server can handle one connection per second but that doesn't mean it completes them always within that one second. When the network works well, it might work fine, but TCP connections can take a highly variable amount of time to connect.

I'd try to build something that watches for UDP packets, but I don't know a common convenient commandline tool for that. netcat doesn't deal with packets in a way that lets you see them, and tries way too hard to be telnet...

Wait...so why wouldn't my netcat idea work? It seems like it could send something to the machine, and on that machine pick it up and run a script, right?

It might be made to work. I'm not sure how you'd manage connections though.