SSH Notes
Categories:

Tunneling ports through an SSH connection:

ssh -L [local port]:[remote host]:[remote port] username@system

Remote host does NOT need to be the same as the system that's being connecting to, but that system must have access to the remote host and port.

Examples:

  • Mail port redirection:
    ssh -L 2525:server.com:25 username@system

    Then set the outgoing mail server to 127.0.0.1 port 2525.

  • Remote desktop port redirection:
    ssh -L 13389:server.com:3389 username@system

    Then connect with the Remote Desktop client to 127.0.0.1:13389