I spent a little bit of time trying to find an answer to this today but I was unsuccessful. I’m hoping one of you will have the secret for me.
I’ve configured my .ssh/config file with profile and port information for the many servers I connect to on a regular basis.
One of the servers I need to access requires bouncing through another server first. ie; In order to access machine2 I have to connect to machine1 first. How to automate this within the .ssh/config?
When I manually connect to this I use:
ssh -t machine1 ssh machine2
What I would like to do is configure my .ssh/config file to use that -t option when connecting to that specific machine. I would like to be able to simple run:
and based on the configuration in the .ssh/config have this automatically connect to machine2.