Last active
January 5, 2020 18:44
-
-
Save tuksik/3640e527bd1bd06b454f57f62b8e3308 to your computer and use it in GitHub Desktop.
Add Vagrant user in k3os
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
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