Transfer from http://www.linux521.com/2009/system/200904/2021.html
Http://www.myhack58.com/Article/48/67/2011/30575.htm
1. Disable Root Direct login
2. To give normal user permissions
AddUser
Join the wheel group directly or
In the FreeBSD system, the default is not to allow the root user to connect directly to the server via SSH, when installing the FreeBSD system to create an additional user, should not be sure to add this user to the wheel group (if you do not join this group will not SSH), You can also create a user after installing the system and add the user to the wheel group.
In FreeBSD to use the SU command to become the root user, not only to know the root password, but also need to go through special settings, otherwise you will not be able to successfully use this command. This is FreeBSD has more stringent restrictions on the user performing the SU command, The user who can use the SU command belongs to the wheel group (root group, group ID 0), otherwise it cannot be the root user. Therefore, you need to edit the group settings file/etc/group to add the administrative members that require Superuser power to the wheel group.
You can use the following command to su-root a normal User:
PW Groupmod wheel-m <username>
PW User MoD <username>-G wheel
or directly modify the/etc/group file, add the corresponding user to the Wheell group can be
Wheel:*:0:root,username
3. Flush the SSH configuration
1 #/etc/rc.d/sshd restart #重启sshd使配置生效
FreeBSD disable root login ssh and give normal user login rights