Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Yann Laviolette
April 27, 2004, 7:10 am
rate this thread
I need to do an SSH tunnel to encrypt the data sent between an agent
and a the server. I'm able to establish a tunnel but there's something
that I can't understand...
What is the difference between the bit -L and the bit -R. I've read
the man of SSH on Fedora. It's seems to be simple but in practice, I
Can somebody help me on this subject?
Thanks a lot!
Re: What is the difference between local port forwarding (-L) and remote port forwarding (-R)
Example: "ssh -L 2000:18.104.22.168:2000 server" is a "local" forward and will
listen on the client (ie the machine you ssh'ed from) on port 2000.
If something connects to the client on port 2000, a "channel" will be
opened inside the SSH connection and the server will connect to 22.214.171.124 on
port 2000. Any data sent or received will be forwarded over this channel.
In contrast, "ssh -R 2000:126.96.36.199:2000 server" is a "remote" forward,
which will cause the *server* to listen on port 2000, and any connection
arriving at that port will be forwarded over the SSH connection and the
client will connect to 188.8.131.52 on port 2000.
Same concept, different directions.
Also try http://www.openssh.com/faq.html#2.11
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — Newest thread in » Secure Shell Forum