AWS 允许root 远程登录Centos7系统
1.使用pem证书远程服务器
2.设置root密码
1 |
sudo passwd root |
3.切换到root用户
1 |
su root |
4.进入到:/etc/ssh 编辑 sshd_config
1 2 |
cd /etc/ssh vi sshd_config |
修改前:
#PermitRootLogin yes
PasswordAuthentication no
修改后:
PermitRootLogin yes
PasswordAuthentication yse
然后重启sshd服务
1 |
service sshd restart |
好了,可以使用root账号登录了
参考资料:
https://www.dwhd.org/20150525_182436.html