Re: [Hampshire] embedded expect

Top Page

Reply to this message
Author: Bob Dunlop
Date:  
To: hampshire
Subject: Re: [Hampshire] embedded expect
Hi,

On Mon, Oct 15 at 10:28, Damian Brasher wrote:
> Yes I know and wouldn't recommend people use this as an everyday solution,
> however in this case expect is acting as a kind of boot strap which then
> allows the script to set up certificates for every day use - so I do
> really need to use this.


Okay well the big problem of course is that ssh will go to great lengths
to ensure that it is getting the password from the keyboard and not
redirected from some script. I think it opens up /dev/tty afresh to
gather the password.

It can be fooled. I think the solution we came up in a previous company
was to fire up the ssh on a slave pseudo tty and run the expect equivalent
redirected to the master end. It was a while ago and I can't remember
the details beyond Martin thinking it was a wonderful messy hack.

-- 
        Bob Dunlop