Allow root ssh login in FreeBSD 9.0

Allow root ssh login in FreeBSD 9.0

OS Detail:

freebsd# uname -ar
FreeBSD freebsd 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:15:25 UTC 2012 root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
freebsd#

As I stated earlier in my some post, this is my first time work in freebsd.
After fresh installation of FreeBSD 9.0-RELEASE I tried to ssh with root user to my server but found it is not able to login.
In linux I always used to check sshd_config file at parameter PermitRootLogin

To allow root ssh login in freebsd, follow the given below steps

Step 1: Edit /etc/ssh/sshd_config and uncomment the line which has parameter PermitRootLogin and instead of no write yes. See given below setting


vi /etc/ssh/sshd_config

PermitRootLogin yes

Step 2: After saving the file, restart the sshd service.

service sshd restart

or

/etc/rc.d/sshd restart

Now try login with root user via ssh

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.