Re: another expect question
- From: "gbarn" <gbarnette@xxxxxxxxxxxx>
- Date: Fri, 31 Mar 2006 11:01:45 -0700
The original script as presented worked fine.
However, I have made the suggested changes and the password is still printed
to my screen. The script is now:
log_user 0
spawn ssh -l root kull
expect "word:"
send "password\r"
expect -re ".*"
interact
"Uwe Klein" <uwe_klein_habertwedt@xxxxxxxxxxx> wrote in message
news:0e40g3-nse.ln1@xxxxxxxxxxxxxxxxxxxxxxx
gbarn wrote:
The script is very simple.............tooo simple ;-)
# ssh sends the password request , then
log_user 0
spawn ssh -l root system_name
# flushes all input and switches to nonecho mode
# in preparation for the password input from the user
# place here:
expect "word: "
# youve seen the query now you may:
send "password\r"
> expect "*"
# this call will expect exactly one "*"
# not all output upto now
# what you want is
expect -re ".*"
interactwhat happens for you is :
I would like to stop the password from being printed to the screen.
you start ssh
you send a password
and no output is ever matched, all is still in the queue.
interact dumps all of that into your lap
uwe
.
- Follow-Ups:
- Re: another expect question
- From: Uwe Klein
- Re: another expect question
- References:
- another expect question
- From: gbarn
- Re: another expect question
- From: Uwe Klein
- Re: another expect question
- From: gbarn
- Re: another expect question
- From: Uwe Klein
- another expect question
- Prev by Date: Re: case conversion
- Next by Date: Re: case conversion
- Previous by thread: Re: another expect question
- Next by thread: Re: another expect question
- Index(es):