阿里云换了个镜像AlmaLinux 9.0,重新使用Xshell远程登录时发现居然没有输入密码的窗口,输入密码的窗口被置灰了。最开始笔者以为是重新换镜像,原理的配置有问题,于是删除连接重新建立连接后,情况依旧,再连接属性里面重新设置用户登录信息后情况依旧。

笔者开始再阿里云网页上使用workbench远程到服务器,使用systemctl status sshd查看sshd服务运行正常,sshd服务的默认端口Port 22也是未被修改。尝试systemctl restart sshd重新拉sshd进程也是无济于事。

直接使用ssh admin@localhost登录,也出现错误提示:Permission denied (publickey,gssapi-keyex,gssapi-with-mic)。一番搜索发现是PasswordAuthentication yes 允许用密码方式登陆这里有问题,将其修改为yes后重新拉sshd进程后就恢复正常了。

网友评论