- To: James Wilkinson <jamesw@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: Executing commands on remote machines (was: Re: [SLUG] SOS)
- From: Jeffrey Borg <jeffrey@xxxxxxxxx>
- Date: Wed Nov 1 00:26:10 2000
- Cc: slug@xxxxxxxxxxx
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.