[wellylug] ssh scripting

Glen Ogilvie nelg at linuxsolutions.co.nz
Sun May 22 14:58:45 NZST 2005


I've done this before using expect.

Expect will let you process the results and then decide what else to do on the 
remote host.  Be warned however, expect programming is not for the faint 
hearted.

Cheers
Glen

On Friday 20 May 2005 8:26 pm, Jamie Baddeley wrote:
> Is it possible to script ssh commands?
>
> i.e. write a shell script like this:
>
> ---------
> #!/usr//bin/ssh host.domain.co.nz
> df -h
>
> ---------
>
> The idea is so I can run remote commands via a script and have the
> results via stdin...
>
> It's assuming I've already shared the keys..
>
> jamie




More information about the wellylug mailing list