Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 04-18-2005, 01:16 AM   #1
Registered: Mar 2005
Posts: 60

Rep: Reputation: 15
SSH Port forwarding

I am trying to forward everything that is coming into server A on port 80 to server B on port 80 using ssh. The way I originally tried this was by typing in "ssh -L 80:serverB:80 serverA" from the server A terminal. This would only start forwarding from, so anybody connecting to server A would not get forwarded.

Now I am trying to use the "ssh -R" command to get this to work. The way I tried this was, from the server A terminal I type "ssh -R 80:serverB:80 serverA". For some reason this doesn't work. I have looked at the syntax for this command many times and I cannot figure out what is wrong!
Old 04-18-2005, 04:09 AM   #2
Senior Member
Registered: May 2003
Location: /var/log/cabin
Distribution: All
Posts: 1,167

Rep: Reputation: 45
No dude. WTH are you doing? SSH port forwards within it's session, and that's it. It is not a VPN, which is what you're trying to do.

If you just want to port forward to an IP without encryption, like if the server is connected on the same switch(which I hope it is), then you would do that with iptables. SSH is a userland volatile app. You don't use that to maintain services.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH Port Forwarding wwnexc Linux - Networking 4 09-29-2005 01:26 AM
Port forwarding for ssh Adriaan Linux - Networking 1 03-08-2004 09:11 AM
Ssh port forwarding? J_Szucs Linux - Networking 1 10-29-2003 04:42 AM
ssh, and port forwarding Tricky Linux - Networking 3 01-06-2003 07:50 PM
SSH port forwarding tarballedtux Linux - Networking 2 05-29-2002 07:16 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:48 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration