Loading... ## 1. 连接实例  <!--more--> ## 2. 进入root用户 ``` sudo -i ``` ## 3. 修改ssh配置文件/etc/ssh/sshd_config ``` vim /etc/ssh/sshd_config ``` 将`PermitRootLogin`和`PasswordAuthentication`都修改为`yes` ``` PermitRootLogin yes PasswordAuthentication yes ``` ## 4. 设置root密码 ``` passwd ``` ## 5. 重启ssh ubuntu: ``` /etc/init.d/ssh restart ``` centos: ``` service sshd restart ``` ## 6. 通过SSH工具连接  最后修改:2024 年 09 月 13 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 如果觉得我的文章对你有用,请随意赞赏