Skip to content

Instantly share code, notes, and snippets.

@fsouza
Last active August 29, 2015 14:10
Show Gist options
  • Save fsouza/09e52ff1bae9a4653579 to your computer and use it in GitHub Desktop.
Save fsouza/09e52ff1bae9a4653579 to your computer and use it in GitHub Desktop.
% mongo --quiet -u my_user -p my_password my_host:27017/tsuru --eval 'db.docker_containers.findOne({id: "<container-id>"}).privatekey' > key_file.pem
% chmod 400 key_file.pem
% ssh localhost -p <container-port> -i key_file.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment