服务器去除秘钥连接,账号迷马连接

雷亚荣

关注

阅读 62

2022-02-16

使用root身份编辑云服务器的ssh登录方式。

su root


vi /etc/ssh/sshd_config


修改如下配置项:


把PasswordAuthentication no 改为 PasswordAuthentication yes

或去掉PasswordAuthentication yes 前面的#注释掉。


把PermitRootLogin no 改为 PermitRootLogin yes

或去掉PermitRootLogin yes 前面的#注释掉。


重启sshd使修改生效。

service sshd restart


精彩评论(0)

0 0 举报