Originally Posted by jhameier
New to Linux:
I have a hardware audit script I want to run on several remote machines around my office. Is there a way to run the script that resides on my machine via ssh or do I need to copy the script to the local machine and then run it...
Agree with smoker...you have to copy it to each machine. BUT
, if each machine has access to a shared resource (like an NFS or Samba mount), you could run it like that.
Issuing a command like this:
ssh <user>@<remote box> "<mount command for NFS resource>;/path/to/script;<dismount command>"
would work. Of course, you'd still have to set up the shared resource, etc., so the work you save on copying the script would be offset by the work you'd do for the shared resource. If it's something you have to do often, setting up a shared resource would be a good thing. That way, you'd only have to change ONE script in one place, if you wanted to update it.