Skip to content

Instantly share code, notes, and snippets.

@sneak
Created November 11, 2013 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sneak/7417381 to your computer and use it in GitHub Desktop.
Save sneak/7417381 to your computer and use it in GitHub Desktop.
Host *.docker
User root
ProxyCommand ssh -T root@docker.mydomain.com 'dockerssh %h' 2> /dev/null
#!/bin/bash
HOST=$(echo $1 | awk -F. '{print $1}')
PORT=$(docker port $HOST 22 | awk -F: '{print $2}')
exec nc 127.0.0.1 $PORT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment