# may prompt you for a provided password if not already configured with ssh keyssh root@[ip]
2. Upgrade packages
apt updateapt upgrade# restart if there's a kernel upgradereboot
3. Set root password
passwd
4. Create non-root user
# if user doesn't existadduser [username]# if user already exists, but password needs to be setsu - [username]usermod -aG sudo [username]
5. Add ssh key for non-root user (if not already configured)
mkdir ~/.sshvim ~/.ssh/authorized_keys# add your public key to the file
6. Disable password and root login
sudo vim /etc/ssh/sshd_config# set/add PasswordAuthentication no# set/add PermitRooLogin no# may also need to check in /etc/ssh/sshd_config.dsudo service ssh restart