Is it possible to setup SSH Tunnels once inside an server so it dont need to specified when connecting?
VPS1 will be used to host the tunnels to different VPS (for now only VPS2)
VPS2 will be sort of hidden behind the tunnel so that running commands like ping, curl etc. will show details from VPS1 instead of VPS2
I used following command as i thought this will fulfill my desire (used it on VPS2)
autossh -M 0 -f -N -L 2222:localhost:22 -p 2222 -o PubkeyAuthentication=no [email protected]
Additionally, i tried to manually specifying the IP of VPS1:
autossh -M 0 -f -N -L 2222:111.111.11.111:22 -p 2222 -o PubkeyAuthentication=no [email protected]
new whenever i try to connect to 111.111.11.111[:]2222 it connects me to the ssh of 111.111.11.111 and asking me for the password for 111.111.11.111 however it should forward it to 222.222.22.222, ask for the password from server 222.222.22.222 etc.
Anyone have a clude as to how i can acivce this? and maybe someone also knows an tool (like a selfhosted webserver dashbord) which allow me to manage this stuff with ease.