Last active
June 19, 2023 04:16
-
-
Save kkumtree/74714c87d6b792cb9e3ff4ea8b281b26 to your computer and use it in GitHub Desktop.
vagrant_vbox_focal_basic
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/focal64" | |
config.vm.define "ubuntu" do |ubuntu| | |
ubuntu.vm.hostname = "kkumtree-server" | |
ubuntu.vm.provider "virtualbox" do |vb| | |
vb.name = "ubuntu-server" | |
vb.cpus = 1 | |
vb.memory = 1024 | |
end | |
ubuntu.vm.network "private_network", ip: "192.168.56.99" | |
ubuntu.vm.provision "shell", inline: <<-SCRIPT | |
sudo sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config | |
sudo useradd kkumtree -m -s /bin/bash | |
sudo usermod -a -G sudo kkumtree | |
echo kkumtree:kkumtree | sudo chpasswd | |
sudo systemctl restart sshd | |
SCRIPT | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment