SSH via Expect disconnects
From: Robert Denton (google1_at_headsprout.com)
Date: 02/26/04
- Next message: lvirden_at_yahoo.com: "Using Tcl to access things like RSS feeds, web logs, etc."
- Previous message: Christian Lerch: "Re: tk_optionMenu usage"
- Next in thread: Andreas Wilm: "Re: SSH via Expect disconnects"
- Reply: Andreas Wilm: "Re: SSH via Expect disconnects"
- Reply: Robert Denton: "Re: SSH via Expect disconnects"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 26 Feb 2004 10:36:10 -0800
Hello all,
I am using an expect script to initiate an SSH session to another host
as such:
#! /usr/bin/expect -f
spawn /usr/bin/ssh -R 3214:localhost:22 host.domain.tld
expect -re "word:"
send "<password>\r"
expect eof
This works just fine, or seems to. Then, when on the other host, I
issue the following command to pick-up that ssh session locally, I am
prompted for the password, I enter it, and then the session
disconnects, with the error: connection closed by 127.0.0.1. Here is
the command used:
ssh -p 3214 localhost
Here's the kicker: if I remove Expect from the equation, and just do
it all manually, the disconnect doesn't occur. Are there any Expect
experts out there who can offer a suggestion?
Thanks, Robert.
- Next message: lvirden_at_yahoo.com: "Using Tcl to access things like RSS feeds, web logs, etc."
- Previous message: Christian Lerch: "Re: tk_optionMenu usage"
- Next in thread: Andreas Wilm: "Re: SSH via Expect disconnects"
- Reply: Andreas Wilm: "Re: SSH via Expect disconnects"
- Reply: Robert Denton: "Re: SSH via Expect disconnects"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|