2022.12.19 現在では既定値で禁止になっています
下記はとりあえず実験してみました
#PermitRootLogin prohibit-password → PermitRootLogin yes に変更すると下記のようにrootでグインできる
$ ssh root@192.168.2.253
root@192.168.2.253's password:
Welcome to Ubuntu 22.10 (GNU/Linux 5.19.0-26-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
0のアップデートはすぐに適用されます。
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
root@ntaka-ubuntu:~#
#PermitRootLogin prohibit-password に戻す ログインできなくなる
$ ssh root@192.168.2.253
root@192.168.2.253's password:
Permission denied, please try again.
root@192.168.2.253's password:
Permission denied, please try again.
root@192.168.2.253's password:
root@192.168.2.253: Permission denied (publickey,password).
#PermitRootLogin prohibit-password → PermitRootLogin no 既定値と同じく ログインできなくなる
$ ssh root@192.168.2.253
root@192.168.2.253's password:
Permission denied, please try again.
root@192.168.2.253's password:
Permission denied, please try again.
root@192.168.2.253's password:
root@192.168.2.253: Permission denied (publickey,password).