If you want to enable and disable root ssh login access on Ubuntu 22.04, you need to open the ssh configuration file using nano /etc/ssh/sshd_config command, set #PermitRootLogin yes to enable ssh login and set
Read More How to Enable and Disable SSH Root Login Ubuntu 22.04