1

I learned about using ssh -L port:host:hostport from DigitalOcean tutorials, and later saw the use of ssh -R port:host:hostport for Remote VSCode extension. I seem to be able to accomplish the same outcome with either -R or -L. How are they different from each other?

2

-R

Specifies that connections to the given TCP port or Unix socket on the remote (server) host are to be forwarded to the local side.

-L

Specifies that connections to the given TCP port or Unix socket on the local (client) host are to be forwarded to the given host and port, or Unix socket, on the remote side.

Use man ssh to find more and compare flags descriptions. You can also find ssh manual at https://manpages.ubuntu.com/manpages/bionic/en/man1/ssh.1.html

  • Consider to add link to actual Ubuntu-related documentation (available in manpages.ubuntu.com ), not OpenBSD's. – N0rbert Apr 29 at 7:58
  • ok, here you go :) – Comar Apr 29 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.