SSH Key login is crucial if you want a safe dev environment plus no typing passwords. UFW is also essential to mitigate bots.
This guide assumes you already have SSH keys if not then follow this guide (Which I stole from) SSH Keys
There is an ssh-copy-id command but I do it manually
In the root directory for the local machine where the key is type in this command:
cat ~/.ssh/id_rsa.pub | ssh [email protected] "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
Now login is as usual ane make sure to edit the sshd_config in order to disable password based authentication
sudo vim /etc/ssh/sshd_config
PasswordAuthentication no
Restart the ssh service and you should be good to go
sudo systemctl restart ssh