aws ec服务器设置密码登录,ec服务器root登录 aws服务器初始化配置
1. 首次实例化机器后,先以ec2-user登录服务器
2. 改root密码
sudo passwd root
3. 然后以root角色登录,修改配置:
cd /etc/sshvim /sshd_config
4. 找到PermitRootLogin,改为下方这种,PasswordAuthentication可能没有,需要新增,
查找参数命令: /PermitRootLogin
PermitRootLogin yes PasswordAuthentication yes
5. 重启sshd
/sbin/service sshd restart
6.然后就可以密码登录了