Unlike many linux distributions FreeBSD by default disables ‘root’ login over SSH (at least it does with FreeBSD 8.2), If you do need to enable remote root logins over SSH this simple blog post will show you what you need to do; the more secure way of gaining remote admin access to your server would ideally be logging in as an alternative user and then using SUDO to perform any administrative tasks.
Firstly, You will need to edit the SSH daemon configuration file to enable this like so..
ee /etc/ssh/sshd_config
Find this line:
#PermitRootLogin no
and change it to:
PermitRootLogin yes
Basically you should have removed the hash ‘#’ from the start of the line (uncomment the line basically) and then change ‘no’ to ‘yes’, save the file and then restart the SSH daemon like so..
/etc/rc.d/sshd restart
…and your done, you should now be able to login as ‘root’ over SSH on your FreeBSD server!
4 replies on “How to enable root login over SSH on FreeBSD 8.2”
[…] 參考 […]
[…] [from] http://blog.bobbyallen.me/2011/07/22/how-to-enable-root-login-over-ssh-on-freebsd-8-2/ […]
[…] ที่มา : http://blog.bobbyallen.me/2011/07/22/how-to-enable-root-login-over-ssh-on-freebsd-8-2/ […]
[…] 10.2,默认是不允许root用户使用SSH登录的。参照这篇文章,把/etc/ssh/sshd_config文件的“#PermitRootLogin no”改成“PermitRootLogin […]