Re: SSH login automation, get stuck at the last step.
- From: Uwe Klein <uwe_klein_habertwedt@xxxxxxxxxxx>
- Date: Wed, 14 Feb 2007 15:25:13 +0100
Schubert wrote:
spawn ssh -p 10022 root@<Server IP address>You still need to expect the output of your batchfile run!
expect "root@<Server IP address>'s password: "
send "public\r"
expect {
"\[root@<Server Name>:<Server IP address>\] " {
send "run batch filename.txt\r"}
}
set output $expect_out(buffer)
puts "$output"
-------------------------------------------------
The $output will print out a warning like:
"Warning: Permanently added <Server IP Address> (RSA) to the list of
known hosts. root@<Server IP address>'s password: ".
I think it should print out the log on success message like: (please
refer to the manual step result on my first post)
<Server Name>
You're logged on from <Another Server IP address>
[root@<Server Name>:<Server IP address>]:"
But it does not. Anybody can figure out how this happens?
otherwise no more input will be processed!
Have you tried to adapt the script I wrote in a previous post?
Btw, after the prompt "[root@<Server Name>:<Server IP address>]: "autologout?
appears on the screen for several minutes, it will exit to the unix
home directory (where I execute the Expect script) automatically.
uwe
.
- Follow-Ups:
- Re: SSH login automation, get stuck at the last step.
- From: Schubert
- Re: SSH login automation, get stuck at the last step.
- References:
- SSH login automation, get stuck at the last step.
- From: Schubert
- Re: SSH login automation, get stuck at the last step.
- From: Uwe Klein
- Re: SSH login automation, get stuck at the last step.
- From: Schubert
- Re: SSH login automation, get stuck at the last step.
- From: Cameron Laird
- Re: SSH login automation, get stuck at the last step.
- From: Schubert
- Re: SSH login automation, get stuck at the last step.
- From: Uwe Klein
- Re: SSH login automation, get stuck at the last step.
- From: Schubert
- SSH login automation, get stuck at the last step.
- Prev by Date: Re: SSH login automation, get stuck at the last step.
- Next by Date: Re: Reading/Parse Word '97 documents with Tcl
- Previous by thread: Re: SSH login automation, get stuck at the last step.
- Next by thread: Re: SSH login automation, get stuck at the last step.
- Index(es):
Relevant Pages
|