So if you need to log on to your FreeBSD machine over ssh with root privilege, then you have to allow root user access for ssh login.
In this example I am using VIM as the text editor but if you don't have VIM editor then you have to use the default EE or VI editor.
If you want to install VIM editor please have a look at the following link:
Installing VIM editor on FreeBSD
To do so, You will need to edit the SSH daemon configuration file.
#vim /etc/ssh/sshd_configFind the below line in the above file:
#PermitRootLogin noThe preceding # mark shows that this line is commented.
You just have to un-comment the line and modify the "no" at the end of file to "yes" (Of course without the quotes).
After modification the line should be looking like as following:
PermitRootLogin yesSave the file and quit vim editor.
Now to reflect the change, you have to restart the ssh daemon by typing the following command on the console:
# /etc/rc.d/sshd restartAfter the above steps if you try accessing your system from another host over ssh protocol, you must be able to login to your system.
If you need to know more on VIM commands then please have a look at the following link:
VIM commands for day to day usage
2 comments
comments"So if you need to log on to your system and need root privilege, then you have" to use sudo! And you should read the book "Sudo Mastery" from Michael W Lucas. Permit root login on your server is really no option.
ReplySeems like my statement was misleading, at least for you.
ReplySo I have updated that accordingly.
I meant root login over ssh protocol and not system login.