I want all my SSH connection go through a VPS so my IP address stay same even if my ISP changes IP. This help me to only access SSH access from my VPS IP address, this increase security as no one else able to SSH to the server.
To force all my SSH connection to use ProxyJump, i edit file
vi ~/.ssh/config
Added
Host * !ok.serverok.in !51.38.246.115 !192.168.1.? ProxyJump [email protected]:3333
In above Host * will match all hosts, so whenever you try to SSH to a server, it will use ProxyJump. I specified some host with !, this will exclude those host from using ProxyJump. One of which is the Jump Host itself, it is important you exclude Jump Host or it will cause a loop and won’t work. You may also need to add your Local IP address.
See SSH
Leave a Reply