[macosx-unix] expect trouble
Jesse Callaway
bonsaime at gmail.com
Tue Jan 8 14:17:16 EST 2008
On Jan 5, 2008 7:37 AM, Jared ''Danger'' Earle <jared at 23x.net> wrote:
> On 5 Jan 2008, at 05:28, Jesse Callaway wrote:
> > I'm sorry. It's easy to be curt on the web. So I'll explain... It's
> > really obvious that I'm using SSH keys if you read the post all the
> > way through.
>
>
> Ok, I got caught up in passphrase vs password.
>
> This part is written for passwords:
> send "$PASS\r"
>
> For passphrases, I'd probably use send_tty instead.
>
> I've seen expect work with ssh key passphrases before, so it can be
> done.
>
> --
> Jared Earle, Nightfall Games, jared at 23x.net - http://www.23x.net
> "Life is SPORK, Highness! Anyone who says differently is selling
> something"
>
This fell off the list for some reason. Sorry all. Anyway, I tried
using send_tty, and the outcome was basically the same except that my
password was echoed to my terminal, and not to the process.
Hey, so I figured it out. If you don't tell expect to do anything
further it kills the spawned processes so that the script can exit
without hanging. I guess it's aggressive in terms of cleaning up after
itself.
Fixed it by adding 'expect eof' as the last line.
Anyway, thanks for helping out Jared.
-jesse
More information about the macosx-unix
mailing list