diff options
author | varac <varacanero@zeromail.org> | 2016-01-18 12:56:08 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2016-01-18 12:56:08 +0100 |
commit | 1ec36bd3e5caccebbcf0725a1144073f4ccf6e5a (patch) | |
tree | 8b5daa74c48ceca62979c8c8a048585a374f954b | |
parent | 4b9307d192de9fcb2f37cd7ec663d3b9b1e4dc18 (diff) |
fix installation of vagrant key
-rw-r--r-- | scripts/vagrant.sh | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/scripts/vagrant.sh b/scripts/vagrant.sh index 1cb2659..900fe9c 100644 --- a/scripts/vagrant.sh +++ b/scripts/vagrant.sh @@ -5,16 +5,14 @@ # Vagrant specific date > /etc/vagrant_box_build_time -# Installing vagrant keys -wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O /tmp/vagrant.pub +# Installing vagrant key for root +mkdir -pm 700 /root/.ssh +wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O /root/.ssh/authorized_keys +chmod 0600 /root/.ssh/authorized_keys -for user in vagrant root -do - mkdir -pm 700 /home/${user}/.ssh - chmod 0600 /home/${user}/.ssh/authorized_keys - cp /tmp/vagrant.pub /home/${user}/.ssh/authorized_keys - chown -R ${user} /home/${user}/.ssh -done +# Installing vagrant key for vagrant user +cp -a /root/.ssh/ /home/vagrant/ +chown -R vagrant:vagrant /home/vagrant/.ssh # configure password-less sudo echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers |