User anlegen und sudo-Gruppe hinzufügen
adduser CoolerUser
usermod -aG sudo CoolerUser
apt update && apt dist-upgrade -y
SSH Key mit PuttyGen erstellen
Quelle: laub-home.de
Enable SSH root login
Quelle: linuxconfig.org
nano /etc/ssh/sshd_config
FROM:
#PermitRootLogin prohibit-password
TO:
PermitRootLogin yes
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
systemctl restart ssh
How to Set Up SSH Keys on Ubuntu
Quelle: digitalocean.com
Quelle: stackexchange.com
mkdir -p ~/.ssh
scp authorized_keys login-id@ubuntu-Host-Ip:~/.ssh
echo public_key_string >> ~/.ssh/authorized_keys
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
How To Disable Root Login
Quelle: digitalocean.com
sudo nano /etc/ssh/sshd_config
PermitRootLogin yes -> PermitRootLogin no
sudo systemctl restart sshd