【报错】提示Password authentication failed

一般是关闭防火墙

# systemctl stop firewalld && systemctl disable firewalld

修改/etc/ssh/sshd_config 配置中#PermitRootLogin no设成 PermitRootLoginyes,再重启sshd服务即可

# vi /etc/ssh/sshd_config

找到PermitRootLogin这样,注释掉之前的配置

#PermitRootLogin no  改为 PermitRootLogin yes

保存退出,重启sshd服务

# systemctl restart sshd.service

# systemctl status sshd.servcie 

如果说在上述方法基础上登录还是提示用户名及密码不正确

看看是不是selinux问题

# setenforce 0  临时关闭

永久关闭

# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

Logo

一站式 AI 云服务平台

更多推荐