Skip to content

Instantly share code, notes, and snippets.

@tuksik
Last active January 5, 2020 18:44
Show Gist options
  • Save tuksik/3640e527bd1bd06b454f57f62b8e3308 to your computer and use it in GitHub Desktop.
Save tuksik/3640e527bd1bd06b454f57f62b8e3308 to your computer and use it in GitHub Desktop.
Add Vagrant user in k3os
sudo adduser --disabled-password --gecos \"\" vagrant
echo vagrant:vagrant | sudo chpasswd
sudo mkdir -p /home/vagrant/.ssh
sudo chmod 0700 /home/vagrant/.ssh
sudo wget --no-check-certificate https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub -O /home/vagrant/.ssh/authorized_keys
sudo chmod 0600 /home/vagrant/.ssh/authorized_keys
sudo chown -R vagrant /home/vagrant/.ssh
sudo echo 'vagrant ALL=(ALL:ALL) ALL' >> /etc/sudoers
sudo mkdir -p /home/rancher/.ssh
sudo chmod 0700 /home/rancher/.ssh
sudo wget --no-check-certificate https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub >> /home/rancher/.ssh/authorized_keys
sudo chmod 0600 /home/rancher/.ssh/authorized_keys
sudo chown -R rancher /home/rancher/.ssh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment