公有云debian系开启密码与root用户登陆

公有云debian系开启密码与root用户登陆

1、sudo su

2、vim /etc/ssh/sshd_config

# 找到PermitRootLogin和PasswordAuthentication

PermitRootLogin yes //改为yes

PasswordAuthentication yes //改为yes

3、/etc/init.d/ssh restart

4、passwd root 修改root密码,

5、ssh root 登陆即可

补充,aws 公有云 开启root登陆,还需要打开,将true变为false:

vim /etc/cloud/cloud.cfg

disable_root: false  //改为false