Skip to content

Instantly share code, notes, and snippets.

@erikhansen
Created May 2, 2020 23:17
Show Gist options
  • Save erikhansen/6ac108d4dd4ecc26f99c50e7956243b6 to your computer and use it in GitHub Desktop.
Save erikhansen/6ac108d4dd4ecc26f99c50e7956243b6 to your computer and use it in GitHub Desktop.
Create private key and unlock it

When you connect to Warden using warden shell, Warden doesn't currently support copying your private key into Docker when you are using Windows. So each time you run warden env up -d, you'll want to copy your private key into Warden and then unlock it. This will only be necessary if you need to make SSH connections from within Warden (such as to sync a database to your local machine).

You'll want to create and customize copy of the warden_create_private_key.txt. Store it some place safe. Then, when you warden shell, you can paste the contents of the file into your shell.

mkdir -p ~/.ssh/; chmod 700 ~/.ssh/;
cat <<EOT >> ~/.ssh/id_rsa
-----BEGIN RSA PRIVATE KEY-----
<INSERT YOUR ~/.ssh/id_rsa file contents>
-----END RSA PRIVATE KEY-----
EOT
chmod 600 ~/.ssh/id_rsa; eval `ssh-agent`; ssh-add
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment