SSH Tunnel

From PedrosBrainDump
Revision as of 14:38, 30 October 2024 by 413vhcu1lq0463ob (talk | contribs) (Created page with "To expose a local port so that it is accessible remotely, use the following command: ssh -R [remote_port]:localhost:[local_port] [user]@[ssh_host] To listen locally for a remote port, use this command: ssh -L [local_port]:[remote_host]:[remote_port] [user]@[ssh_host] * -N no remote command to execute, will not show the shell")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

To expose a local port so that it is accessible remotely, use the following command:

ssh -R [remote_port]:localhost:[local_port] [user]@[ssh_host]

To listen locally for a remote port, use this command:

ssh -L [local_port]:[remote_host]:[remote_port] [user]@[ssh_host]
  • -N no remote command to execute, will not show the shell