[macosx-unix] expect trouble
Peter Booth
peter_booth at mac.com
Tue Jan 8 15:15:34 EST 2008
FWIW
I have found Ruby's net-ssh and, for many use cases, Capistrano are
great higher level replacements for expect.
Capistrano is useful when you want to execute code (and deploy stuff)
to multiple machines.
On Jan 8, 2008, at 2:17 PM, Jesse Callaway wrote:
> 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
> _______________________________________________
> macosx-unix mailing list
> macosx-unix at lesmuug.org
> http://beth.lesmuug.org/mailman/listinfo/macosx-unix
More information about the macosx-unix
mailing list