expect: telnet within telnet 
Author Message
 expect: telnet within telnet

I'm new to expect.  I wrote an expect script that telnets to a remote machine
and then performs a "telnet localhost port#" on that machine (or so I'd hoped).
  The problem is that the 2nd telnet (to the localhost on the remote machine)
is actually sent to the first machine from which I started the expect script (I
know this because of the error message that is displayed, since the 1st host
does not allow a localhost telnet to the specified port#).

I'm using the Unix expect that comes on the Cygnus gcc distribution for 96q3.

Thanks!

:)hal mahaffey



Sun, 23 Jul 2000 03:00:00 GMT  
 expect: telnet within telnet

Quote:

> I'm new to expect.  I wrote an expect script that telnets to a remote machine
> and then performs a "telnet localhost port#" on that machine (or so I'd hoped).

How did you try to do that?

   send "telnet localhost $port"

will do the right thing I think, but

   spawn "telnet localhost $port"

will start telnet on the local machine.

--



Sun, 23 Jul 2000 03:00:00 GMT  
 expect: telnet within telnet


Quote:
>I'm new to expect.  I wrote an expect script that telnets to a remote machine
>and then performs a "telnet localhost port#" on that machine (or so I'd hoped).
>  The problem is that the 2nd telnet (to the localhost on the remote machine)
>is actually sent to the first machine from which I started the expect script (I
>know this because of the error message that is displayed, since the 1st host
>does not allow a localhost telnet to the specified port#).

Let's see the script!  Don't forget to delete the usernames &
passwords before you post!

--jim



Sun, 23 Jul 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Using tcl telnet client with Windows telnet server

2. Spawn a telnet session from a spawned telnet session

3. How to call TELNET from within a script?

4. How to call TELNET from within a script?

5. Telnetlib - Clearing/resetting within a Telnet Object

6. Expect Telnet Error Handle?

7. Using telnet by expect

8. telnet expect script error

9. Capture Telnet prompt with Expect

10. Using Expect on a screen session telnet'd to a terminal server

11. expect + telnet hangs on AIX

12. expect to telnet and running and unknow script

 

 
Powered by phpBB® Forum Software