Answer
Setting PermitRootLogin
to Yes
in your SSH config does not override Ubuntu's security policy that does not allow root logins.
If you want to login as root over SSH you will need to first enable the root account (Note that you virtually never need to login as root, sudo
will virtually always be sufficient for any task requiring root privileges. See here for more info on Ubuntu's security policy regarding sudo and the root account).
That said, if you really want to log in as root over SSH first enable the root account by setting a password for it.
sudo passwd root
Then, assuming PermitRootLogin
is still enabled in your
SSH server config, you should be able to login as root via SSH. Note
that you really, really should be using Public/Private key pairs
to login to the root account to keep the fairly risky business of
enabling a root account and allowing it to be logged into via SSH from
becoming just outright dangerous.
Once you've finished doing whatever you need to do with the root account I would recommend disabling it again by removing the password.
sudo passwd -dl root