Skip to content

Instantly share code, notes, and snippets.

@Sydney-o9
Last active December 1, 2015 00:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sydney-o9/96be1c0eab80c1cd4249 to your computer and use it in GitHub Desktop.
Save Sydney-o9/96be1c0eab80c1cd4249 to your computer and use it in GitHub Desktop.
Fix SSH Error in Vagrant Box
#!/usr/bin/env bash
echo "1. Download public SSH Key vagrant.pub and replace it to .ssh/authorized_keys"
wget https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub -O /home/vagrant/.ssh/authorized_keys
echo "2. Change Permissions .ssh/ (chmod 700)"
chmod 700 .ssh
echo "3. Change Permissions .ssh/ (vagrant:vagrant)"
chown -R vagrant:vagrant .ssh
echo "4. Change Permissions .ssh/authorized_keys (chmod 600)"
chmod 600 .ssh/authorized_keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment