Assuming you have logged in as root with a password Creating a non-root User adduser ubuntu usermod -aG sudo ubuntu Add your SSH key to the new User ssh-copy-id ubuntu@ ssh ubuntu@ Enabling Firewall sudo ufw app list sudo ufw status Disable root login and password based login sudo vim /etc/ssh/sshd_config Uncomment and set: PasswordAuthentication […]