Last active
August 29, 2015 14:02
-
-
Save luksa/d95ecf318b5e57f811bd to your computer and use it in GitHub Desktop.
ssh into fabric8 docker container by container id (e.g. sshf 5043fb)
This file contains 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
#/bin/sh | |
# Store this into a file called "sshf" and do a chmod +x on it. | |
# Then simply do a "docker ps" to see the container id and then invoke "sshf <container id>" to ssh into | |
# that container | |
echo ssh-ing to docker container $1 \(port `docker port $1 22 | sed 's/.*://'`\) | |
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PreferredAuthentications=password fabric8@localhost -p `docker port $1 22 | sed 's/.*://'` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment