安装了一台 FreeBSD 服务器,用 secureCRT 远程登录,但是出错:keyboard-interactive authentication with ssh2 server fail。
网上查阅资料后发现原来 FreeBSD root 的默认登录方式是:keyboard-interactive ,即不可以在远程通过密码登录,这样做是为了安全的考虑。但是作为一个初学者,我的目的只是学习。所以粗暴地修改了登录方式,增加了:password-authentication,方法如下:
1、vi /etc/ssh/sshd_config
找到 #PasswordAuthentication no 去掉 # 后面增加 no->yes
找到 #PermitRootLogin = no 去掉 # 后面增加 no->yes
找到 #PermitEmptyPasswords no 去掉 #
然后保存退出::wq
2、重启 ssh
/etc/rc.d/sshd restart
3、可以远程登录了...