Allowing SSH Login Using Root From Your FreeBSD Distributions
FreeBSD will not allow someone to log in as a root user via SSH by default. It’s security matters; if the root user is very accessible, it will then be easier for an attacker to breach the system.
The Problem
Still, some local developers or researchers need a faster method to finish our job. In this story, I want to answer your questions about how to log in to ssh as a root user in FreeBSD.
The Solutions
The default SSH configurations on FreeBSD forbid root logins; it was written on /etc/ssh/sshd_config; the default version is this
Remove the # on PermitRootLogin and change no into yes like this to allow ssh using root.
Save and restart the SSH service
Try login again using ssh
Conclusions
Many users said it’s better to log in using an authorized_ssh key instead of a password. That’s true since the SSH key is unique and hard for hackers to remember. In this article, I want to share it with you because I know that your work matters.