This simple ssh/config saves lots of manual work
Host jumphost
HostName jumphost.my.home.net
HostKeyAlgorithms ssh-dss
ForwardAgent yes
LocalForward 3128 proxyhost.my.home.net:3128
User sanjeev
StrictHostKeyChecking no
ConnectTimeout 30
KeepAlive noHost *.my.office.net
HostName %h
User sanjeev
ForwardAgent yes
ProxyCommand ssh jumphost nc -w 120 %h %p
StrictHostKeyChecking no
ConnectTimeout 30
KeepAlive no
Now from your laptop you can do seamless connection, for any ssh activities
ssh host1.my.office.net "cat watch.status"
This goes through proxyhost to connect to office network, login to jumphost and connect to office network host, cat the file watch.status from host1, in office network :)
No comments:
Post a Comment