LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   ssh tunnel (https://www.linuxquestions.org/questions/linux-networking-3/ssh-tunnel-222311/)

crep 08-25-2004 02:21 PM

ssh tunnel
 
Hello,

I've seen some tutorials on using an ssh tunnel like this:

[my box] *>**encrypted data **>**>[his box]

and then I telnet(or whatever) to my box, and it gets to his box. However, I'd like to connect to his box, and have it forward to my box.

Let me explain. My box is behind a firewall nat'ed, and thus cannot receive connections. I'd like to make a tunnel to a friends box. Then, If I telnet to the friends box, i can reach my box. (since my box can ONLY make outbound connections.).

Ideas?

Thanks,

-Jack C
jack {at} crepinc.com
www [dot] crepinc [dot] com

david_ross 08-25-2004 03:30 PM

You can use:
ssh -R 23:127.0.0.1:10023 -l REMOTE_USER -N IP.OF.REMOTE.SERVER

Then you can telnet to port 10023 on his server. Make sure you enable "GatewayPorts" in the remote sshd's config file.

If you re telnetting to his box over the internet though you may want to use ssh instead.

crep 08-25-2004 08:24 PM

:) Thank.


All times are GMT -5. The time now is 07:57 AM.