Recently on CyberCity nice article appeared about using middle server to connect to our destination servers. Most of servers have firewalls which allow connect only from given pool of IP addresses. So tunnelling is very useful as long we are using it in smart way.
Quick round up of vivek’s article
SFTP connection with ProxyCommand
sftp -o 'ProxyCommand=/usr/bin/ssh firstname.lastname@example.org -p 66 /usr/bin/nc %h %p %r' email@example.com
Just be awere that we are not using standard SSH 22 port – it’s 66
SSH tunnel with ProxyCommand
Host nickname HostName destination.server.com User username ProxyCommand /usr/bin/ssh firstname.lastname@example.org -p 66 /usr/bin/nc %h %p %r
to connect you just type