ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Using SSH to Create a Reverse Tunnel to Access Linux Through NAT

    News
    linux ssh
    2
    3
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mlnewsM
      mlnews
      last edited by

      http://xmodulo.com/access-linux-server-behind-nat-reverse-ssh-tunnel.html

      1 Reply Last reply Reply Quote 2
      • scottalanmillerS
        scottalanmiller
        last edited by

        Quick version of the above:

        ssh -fN -R 10022:localhost:22 [email protected]
        

        All you have to do is change jumpserver.com to the FQDN or IP address of the server you want to connect "from" and change sam to your username there. Done. The TCP port on the server will be 10022, you can change that as needed.

        1 Reply Last reply Reply Quote 1
        • scottalanmillerS
          scottalanmiller
          last edited by

          Now from the server that you just connected to you can do something like this...

          ssh root@localhost -p 10022
          
          1 Reply Last reply Reply Quote 1
          • 1 / 1
          • First post
            Last post