解决阿里云服务器连接Permission Denied(publickey)

用阿里云Web终端(就是那个网页终端)或者Xshell连接到服务器修改配置文件。

vi /etc/ssh/sshd_config 将PasswordAuthentication的参数设置为yes 应该在文件末尾
systemctl restart sshd.service 重启ssh服务
systemctl status sshd.service 查看ssh服务状态
ssh -p 22 [email protected] 通过指定端口连接(确保端口已打开) ,也可以不加端口

然后就可以用终端连接了

猜你喜欢

转载自www.cnblogs.com/7sxbc/p/10176742.html
今日推荐