View Single Post

  #1 (permalink)  
Old 08-10-2004
Chris Adams
 
Posts: n/a
Default Don't know if SSH was ever designed to do this, but...

G'day,

I'm wondering if it's possible to tunnel a TCP connection using shell
redirection over an ssh connection? The sshd I wish to tunnel through
happens to have AllowTcpForwarding set to no, and I'd like to be able to
tunnel through it to get to my home network, mainly to use RDP on port 3389
(winxp remote desktop).

I've so far been looking at a solution combining twinpipe with nc... so the
command line looks like:

twinpipe 'ssh <home> nc -p 3389' 'nc -l -p 3389'

Which in theory joins the netcat's started on the 2 machines involved using
a pipe and a fifo buffer (which is set up by twinpipe and exist on the local
machine). ssh still asks for and accepts the password from the shell,
despite both its input and output being redirected. Clever little devil.

I then connect to the box running the twinpipe process within a few seconds
of everything being established.

Haven't made this work as of yet.. is there a better way to achieve what I'm
trying to achieve - or is this the way and there's something I'm missing?

Thanks heaps.
Chris

twinpipe creates a 2-way pipe between the commands passed as its first and
second parameters. simple yet effective.
twinpipe: http://bisqwit.iki.fi/source/twinpipe.html


Reply With Quote