Trying to ssh root, why get permssion denied in 16.04?
In Ubuntu, the default SSH policy is "Deny root login via SSH directly, except by SSH Key Authentication only." This is done by the PermitRootLogin without-password
line of /etc/ssh/sshd_config
.
You can enable root password login over SSH by changing that line to say PermitRootLogin yes
. However I must caution you - this permits brute forcing attempts over the Internet of the root
password which puts your server at risk - you may wish to consider blocking all SSH traffic except from known "good IP sources" of which you trust the source IPs in order to reduce the chance of being brute-forced on the root login. Where this is not possible, you should strongly consider setting up SSH key authentication for the root account instead of password authentication.