为了安全起见,FreeBSD默认情况下是不允许root用户进行SSH远程登录的,需要进行以下操作才可以进行Root用户的ssh远程登录。
首先vi编辑/etc/inetd.conf,去掉ssh前的#注释,保存后:wq退出 (开启监听ssh服务)
编辑/etc/rc.conf
最后加入:sshd_enable=”yes”即可
激活sshd服务:
#/etc/rc.d/sshd start
用此命令检查服务是否启动,在22端口应该有监听。
#netstat -an ## check port number 22
最后
#vi /etc/ssh/sshd_config
在/etc/ssh/sshd_config最后中加入
PermitRootLogin yes #允许root登录
PermitEmptyPasswords no #不允许空密码登录
PasswordAuthentication yes # 设置是否使用口令验证。