Last active
July 19, 2025 03:58
-
-
Save ScottKillen/e6eb319e8ce5313680817b29f7831251 to your computer and use it in GitHub Desktop.
Ubuntu VM Boilerplate
This file contains hidden or 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 rm -f /var/lib/dbus/machine-id | |
sudo rm -f /etc/machine-id | |
sudo dbus-uuidgen --ensure=/etc/machine-id | |
sudo ln -s /etc/machine-id /var/lib/dbus/ | |
# For SSHD | |
sudo ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa -y | |
sudo ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa -y | |
sudo ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t ecdsa -b 521 -y | |
sudo touch /etc/cloud-init.disabled | |
sed -i 's/ubuntu-template/nginx/g' /etc/hosts | |
sed -i 's/ubuntu-template/nginx/g' /etc/hostname | |
hostnamectl set-hostname nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment