Open the SSH configuration file sshd_config with the text editor nano: sudo nano /etc/ssh/sshd_config Search for the entry Port 22. Replace port 22 with a port between 1024 and 65536.
adduser sammy
usermod -aG sudo sammy
/etc/ssh/sshd_config: PermitRootLogin no
sudo service ssh restart
Also, PermitRootLogin prohibit-password is specific to the root account, PasswordAuthentication no is a global setting that affects all the accounts.