Created
June 25, 2014 13:01
-
-
Save walm/40a2f1021ecef6ffeafc to your computer and use it in GitHub Desktop.
Dynamic SSH host config for docker containers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usage: ssh <container-name>.doc | |
Host *.doc | |
ProxyCommand netcat $(docker inspect --format '{{ .NetworkSettings.IPAddress }}' `echo %h | sed -e 's/.doc//'`) 22 | |
StrictHostKeyChecking no | |
User root | |
IdentityFile /etc/ssh/keys/docker.key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment