How to edit sshd.conf file in nixos to disable the root ssh login

How to edit sshd.conf file in nixos to disable the root ssh login.

You need to customize services.openssh.permitRootLogin in your configuration.

https://search.nixos.org/options?channel=22.11&from=0&size=50&sort=relevance&type=packages&query=services.openssh.permitRootLogin

2 Likes