Reverse SSH

ssh to Linux box that sits behind NAT with reverse SSH tunneling

On Raspberry Pi

 ssh -R 19999:localhost:22 bobby@86.127.101.34

On my home machine

 ssh localhost -p 19999 

19999 is just a sample port

-Reverse SSH from the Target PC to the middleman:

ssh -R {PortOnMiddlePC}:localhost:{PortOnTargetPC} {UserOnMiddlePC}@{IPofMiddlePC}

ssh -R 19999:localhost:22 middleman@188.88.88.88

-Now from the Client PC pull the port down from the middleman:

 ssh -L {PortOnClientPC}:localhost:{PortOnMiddlePC} {UserOnMiddlePC}@{IPofMiddlePC}

ssh -L 19999:localhost:19999 middleman@188.88.88.88

-Now you can ssh the Target PC from the Client PC:

ssh localhost -p {PortForwardedFromTargetPC}

ssh localhost -p 19999