March 23

Linux: reverse ssh simplified

If you are tired of reading long blog posts of using reverse ssh you came to the right place.

Scenario:
You want to connect from your workstation to a server.
Both are on their own networks and are behind NAT.

Target: Server behind firewall
Jump: Server on the internet that you have control of the firewall
Source: Your Workstation behind firewall

Steps (Target connects to Jump, Source connects to Jump, From Jump you connect to Target):

  1. Target:
    ssh -fN -R 45000:localhost:22 username@Jumpserverip
  2. Source:
    ssh username@jumpserverip
  3. Jump:
    ssh useronTarget@localhost -p 45000


Copyright 2021. All rights reserved.

Posted March 23, 2022 by Timothy Conrad in category "Linux

About the Author

If I were to describe myself with one word it would be, creative. I am interested in almost everything which keeps me rather busy. Here you will find some of my technical musings. Securely email me using - PGP: 4CB8 91EB 0C0A A530 3BE9 6D76 B076 96F1 6135 0A1B