Skip to content

Instantly share code, notes, and snippets.

@Farzy
Created August 4, 2009 11:35
Show Gist options
  • Save Farzy/161165 to your computer and use it in GitHub Desktop.
Save Farzy/161165 to your computer and use it in GitHub Desktop.
Proxy an SSH connection through another SSH session
Host srv1
Hostname srv1.client.fr
User root
ProxyCommand ssh firewall nc %h %p
Host srv2
Hostname srv2.client.fr
User root
ProxyCommand ssh firewall nc %h %p
Host firewall
Hostname firewall.client.fr
User root
# Some port forwarding
LocalForward 10389 srv1:389
LocalForward 11389 srv2:389
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment