Jump to content

[tip] SSH bounce port 80

Recommended Posts

with autossh setup in the typical way (known_hosts setup, autoorized_keys copied to server) and the server configured as usual (AllowTcpForwarding yes, GatewayPorts yes) one can conveniently forward arbitrary ports, such as 80, rather than the typical 22 with the following command:

ssh -i /root/.ssh/id_rsa -N -T -R localhost:80: root@<server ip>

Bonus: using "-Cav" on the SSH command provides useful debug info such as "debug1: All remote forwarding requests processed"

Of course make sure the SSH server you're forwarding 80 through doesn't also have a www server like apache running.

Link to comment
Share on other sites

Darren, just to be clear... This command should port forward (-R) port 80 from the pineapple (localhost:80) to all interfaces (e.g. NICs) on the remote server (, correct?

You can of course combine this with multiple -L or -R port forwards on the same tunnel.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...