谷歌VPS云服务器开启root登录

…衆ロ難τιáo~ 提交于 2019-12-10 18:24:28
1: 登录服务器,切换到root用户,命令:sudo su
[chiuci2016@instance-3 ~]$ sudo su
 
2: 修改ssh配置文件
[root@instance-3 chiuci2016]# vim /etc/ssh/sshd_config
修改下面两个参数把no改为yes
PermitRootLogin no
PasswordAuthentication no
 
3: 重启ssh服务使修改生效
debain命令:/etc/init.d/ssh restart
centos命令:service sshd restart
 
4: 给root账户添加密码
命令:passwd root
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!