Skip to content

Instantly share code, notes, and snippets.

@ninjix
Created December 13, 2014 03:01
Show Gist options
  • Save ninjix/a3e9773de138c2dbfa68 to your computer and use it in GitHub Desktop.
Save ninjix/a3e9773de138c2dbfa68 to your computer and use it in GitHub Desktop.
SSH config for LXC containers
Host *.lxc
User ubuntu
IdentityFile ~/.ssh/id_rsa
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
ProxyCommand nc $(grep $(echo %h | sed "s/\.lxc//g") /var/lib/misc/dnsmasq.lxcbr0.leases | awk '{ print $3 }') %p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment