[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to use ssh to forward remote port to local host and port



 
    
how to use ssh to forward remote port to local host and port
------------------------------------------------------------

host ekser is behind the firewall. host igloo is in public domain.

[root@esker root]# ssh -R 4444:localhost:4443 igloo
root@igloo's password: 
Last login: Mon Nov 17 21:44:25 2003 from esker.its.unimacq.edu.au

[root@igloo root]# telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

[root@igloo root]# telnet igloo 4444
Trying 137.111.20.252...
telnet: connect to address 137.111.20.252: Connection refused

Then use tcpxd to forward another pord to this localhost port:

[root@igloo root]# /usr/local/src/tcpxd-1.3/tcpxd 4443 localhost:4444

So you can connect from outside world:

[root@igloo root]# telnet igloo 4443
Trying 137.111.20.252...
Connected to igloo.
Escape character is '^]'.


Google