0

My network configuration:

  • host 1 [h1] - User machine connected via VPN to the main host (host 2). (Win 7)

  • host 2 [h2] - The gate through other machines of my network. No firewall, no ip rules. (Win XP)

  • host 3 [h3] - The target machine. (Win XP)

From h1 I'm able to connect via telnet to h2 or start a cmd line session with psexec. From h2 I can do the same pointing at h3. Now I would like to start a telnet session from h2 to h3, redirect the interactive output to h1 and send back input from h1 to h3.

What have I done:

I know psexec + telnet is not possible and netcat should be a good alternative, but it seems unable to handle prompt interactivity. Ideas?

  • There isn't really "interactivity"; telnet merely sends characters back and forth. Generally a program that automates interaction with a telnet interface (or similar) expecting interactive input is called an expect script; take a look at methods used to write those. – Falcon Momot Sep 11 '13 at 08:18

1 Answers1

1

You could use ssh for windows, but it requires additional software like cygwin which you mightn't need.

Try Zedebee, it's a simple secure IP tunnel.

It runs well on windows and unix systems.

And it's a snap to setup.

Install it on hosts 1 & 2.

on h2 run:

zedebee -s host3:telnet

on h1 run:

zedebee host2 host3:telnet

It will print a port number.

then on h1 run:

telnet localhost <port>
Aaron Tate
  • 1,222
  • 7
  • 9