[FreeBSD] How to allow Root access on FreeBSD over ssh protocol
 

[FreeBSD] How to allow Root access on FreeBSD over ssh protocol

 

This post was last updated on November 3rd, 2020 at 05:37 pm

By default FreeBSD does not allow root access over ssh protocol.
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:
install vim on FreeBSD

To do so, You will need to edit the SSH daemon configuration file.

#vim /etc/ssh/sshd_config

Find the below line in the above file:

#PermitRootLogin no

The 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 yes

Save 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 restart

After 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

Previous [How to solve] Could not load host key: /etc/ssh/ssh_host_rsa_key issue in FreeBSD or Linux
Next [FreeBSD] How to install VIM in FreeBSD
 

About author

shibaa987
shibaa987 268 posts

Linux kernel developer and a firmware developer with an experience of 10+ years.

View all posts by this author →

You might also like

FreeBSD 0 Comments

How To Setup And Use PF Firewall On FreeBSD 12.1?

A firewall is a network security system that monitors incoming and outgoing network traffic flows through a system. It allows or blocks the data packets based on a set of

FreeBSD 0 Comments

[FreeBSD] How to install VIM in FreeBSD

This post was last updated on November 3rd, 2020 at 05:36 pm[wr_row][wr_column]By default FreeBSD comes in a command line user interface. As an Administrator or a Device Drive developer or

How To 0 Comments

How To Add A User To A Group In FreeBSD?

This post was last updated on August 1st, 2020 at 12:12 pmIn FreeBSD, a group is a list of users. It makes it easier to define the permissions such as

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Reply