Last active
February 29, 2016 21:05
-
-
Save dtenenba/068910d0951718220e9a to your computer and use it in GitHub Desktop.
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/bash | |
# does not use keypairs yet (see https://discourse.chef.io/t/test-kitchen-ssh-key-for-use-with-vagrant/7892) | |
# so you will be prompted for the password ('vagrant') once as we add our | |
# public key to the list of authorized keys. | |
cat ~/.ssh/id_rsa.pub | ssh -p 2222 vagrant@localhost "cat >> .ssh/authorized_keys" | |
scp -P 2222 /Users/dtenenba/chef-repo/encrypted_data_bag_secret vagrant@localhost:/tmp | |
ssh -p 2222 vagrant@localhost "sudo rm -f /etc/chef/encrypted_data_bag_secret && sudo mkdir -p /etc/chef && sudo mv /tmp/encrypted_data_bag_secret /etc/chef/ && sudo chown root /etc/chef/encrypted_data_bag_secret && sudo chmod 0400 /etc/chef/encrypted_data_bag_secret" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment