LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   proxyjump to reverse ssh connection on bastion? (https://www.linuxquestions.org/questions/linux-networking-3/proxyjump-to-reverse-ssh-connection-on-bastion-4175665538/)

nicedreams 12-06-2019 05:01 PM

proxyjump to reverse ssh connection on bastion?
 
I have a linux box connected via reverse ssh to a cloud server. From there I can ssh into that connected box from cloud server doing: ssh localhost -p 5432

What I want to do is be able to proxyjump from home to cloud server into the box connected via reverse ssh. I've tried multiple commands where this seems most logical

ssh -J user@cloudserver.com localhost:5432

but doesn't work. My logic is I jump to user@cloudserver.com and connect to it's localhost:5432 port which would be the reverse ssh connected box.

It it possible to proxyjump to a reverse connected ssh tunnel? Do I not use -J flag?

nicedreams 12-06-2019 05:27 PM

Of course I think I figured it out after posting this. Working by doing the following:

ssh -J user@cloudserver.com localhost -p 5432


All times are GMT -5. The time now is 07:40 PM.