[wellylug] ssh scripting

Cliff Pratt enkidu at cliffp.com
Fri May 20 21:37:13 NZST 2005


jumbophut wrote:
> On 5/20/05, Jamie Baddeley wrote:
> 
>>Sure. What I was wanting to do is run a series of commands remotely, and
>>process the results locally. I could do a mean seqence of command|
>>command etc, but I thought it might be funky to see if I could do it
>>this way.
>>
> 
> scp scriptfile user at remotehost:/tmp/scriptfile
> ssh user at remotehost 'bash /tmp/scriptfile; rm /tmp/scriptfile'
> 
Well, I'm not sure why you want to bash it, since the bare 
command seems to work. Ah! Is that to avoid the need to make 
it executable?

Cheers,

Cliff




More information about the wellylug mailing list