Steps
- Open
/etc/ssh/sshd_config#PermitRootLogin prohibit-passwordshould be changed toPermitRootLogin yes
- Run
sudo systemctl restart ssh - By default the root’s password is not set on Ubuntu 20.04 and the error message
Permission denied, please try againwill appear when attempting to SSH login as a root user. From this reason we need to set root’s password. When prompted enter your current user password followed by new root password- Run
sudo passwd
- Run