Skip to content

Instantly share code, notes, and snippets.

@espenmn
Created February 24, 2023 11:49
Show Gist options
  • Select an option

  • Save espenmn/a79148dcbe4142694a15884e1b1bf8d9 to your computer and use it in GitHub Desktop.

Select an option

Save espenmn/a79148dcbe4142694a15884e1b1bf8d9 to your computer and use it in GitHub Desktop.
ssh -L 61000:localhost:5901 -N -l navn servername.local
@espenmn
Copy link
Copy Markdown
Author

espenmn commented Jul 14, 2023

ssh -L local_port:destination_server_ip:remote_port ssh_server_hostname

⦁ ssh – Starts the SSH client program on the local machine and establishes a secure connection to the remote SSH server.

⦁ -L local_port:destination_server_ip:remote_port – The local port on the local client is being forwarded to the port of the destination remote server.

⦁ ssh_server_hostname – This element of the syntax represents the hostname or IP address of the remote SSH server.

A practical example of an SSH port forwarding command would take the following form:

ssh –L 5901:188.17.0.5:4492 pnap@ssh.server.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment