Re: [Hampshire] embedded expect

Top Page
Author: Dave Walker
Date:  
To: hampshire
Subject: Re: [Hampshire] embedded expect

Reply to this message
gpg: failed to create temporary file '/var/lib/lurker/.#lk0x57092100.hantslug.org.uk.27394': Permission denied
gpg: keyblock resource '/var/lib/lurker/pubring.gpg': Permission denied
gpg: Signature made Sat Oct 13 22:07:14 2007 BST
gpg: using DSA key D17910D5904A3269
gpg: Can't check signature: No public key

On Sat, 2007-10-13 at 19:37 +0100, Damian Brasher wrote:
> Hi List
>
> I am trying to embed an expect routine into a script using the 'HERE' tag
> ( << EOF) to automate some processes on a machine over ssh, this is my
> first attempt, as you can see I have used a config file and some
> environment variables are pulled in:
>
> Can anyone check the syntax of this - something is wrong as it appears the
> login does not work and hence the test command not executed?
>
> I have used http://bash.cyberciti.biz/security/sshlogin.exp.php as a
> reference, but decided I needed more than the expect 'set' variable, as
> well as the expect man page after building expect from source, the source
> requires Tcl to build but not to run, the platform can be chosen by
> switches at build time:
>

<SNIP>

Hi Damian,

"expect" is a black magic that I have had awful trouble getting to work
as expected. It's trial and error.

Have you considered using key based authentication and the 'command'
argument of SSH to fire off a script on the remote host?

Kind Regards,
Dave Walker