1.打开SSH所在目录
cd /etc/ssh/
2.创建保存默认密钥的文件夹
mkdir keys_backup
3.将默认密钥移动到该文件夹中
mv ssh_host_* keys_backup
4.重新创建新的密钥
dpkg-reconfigure openssh-server
5.修改sshd_config文件,该文件位于 /etc/ssh/sshd_config 中
将#PasswordAuthentication yes的注释去掉,然后将
PermitEmptyPasswords no修改为PermitRootLogin yes
保存退出
6.启动SSH服务
/etc/init.d/ssh start
附:查看服务运行状态: netstat -antp