Note: These are not designed to be tutorials but more as notes to myself! (Like most of my site)
Change Hostname sudo hostnamectl set-hostname new name (no longer works! Ubuntou resets on reboot)
Setup Static IP /etc/netplan/01-netcfg.yaml
network:
version: 2
renderer: networkd
ethernets:
eth0:
addresses:
- 10.0.1.10/27
nameservers:
addresses: [10.0.1.1]
routes:
- to: default
via: 10.0.1.1
To setup a 2nd ethernet connection
Run ip link to get the name
General Firewall Rules
sudo ufw default deny incoming on interface name
sudo ufw allow in on interface name to [interface name ipaddress] port 80 proto tcp
Setup SSH Certificate Login Change the following:
PasswordAuthentication no
PubkeyAcceptedAlgorithms=+ssh-rsa
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication no
UsePAM no
Also required for Unbuntu 23.04 to disable password login:
/etc/ssh/sshd_config.d/50-cloud-init.conf
PasswordAuthentication no