Tugger the SLUGger!SLUG Mailing List Archives

Re: Executing commands on remote machines (was: Re: [SLUG] SOS)


Everything else deleted. This idea should work!
You could also try pipeing the script into sh like this

ssh newhost /bin/sh < script

might work? but being unix it should! 

well it does work
echo "echo testin" | ssh somehost /bin/sh 

yields you guessed it.
testin

saves the copying anyway.

Jeff

> $ scp script newhost:script
> $ ssh newhost script
> 
> will copy the script to the new host and then attempt to run it.
> 
> For the examples you gave, something like
> 
> $ ssh newhost ls
> 
> would do just what you want.