Skip to content

Instantly share code, notes, and snippets.

@dylanvee
Created August 19, 2012 06:49
Show Gist options
  • Save dylanvee/3392923 to your computer and use it in GitHub Desktop.
Save dylanvee/3392923 to your computer and use it in GitHub Desktop.
SSH *.lxc
# based on http://www.stgraber.org/2012/07/17/easily-ssh-to-your-containers-and-vms-on-ubuntu-12-04-lts/
Host *.lxc
User ubuntu
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
ProxyCommand nc $(host $(echo %h | sed "s/.lxc//g") 10.0.3.1 | tail -1 | awk '{print $NF}') %p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment