一:设置使用密码登录
设置sshd_config配置文件中PasswordAuthentication 为yes
vim /etc/ssh/sshd_config
PasswordAuthentication yes
然后重启sshd服务
service sshd start
二:XShell连接Linux服务器提示拒绝密码
首先检查 /etc/ssh/ssh_config文件:
ssh服务端口是否为22,Protocol协议版本是否为2;
然后检查/etc/ssh/sshd_config:
将Authentication:
LoginGraceTime 120
PermitRootLogin without passwd
StrictModes yes
改成Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes
最后重启sshd服务
service sshd start
版权声明:本文为sinat_26587709原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。