亚马逊AWS更改LINUX为ROOT权限密码登陆

亚马逊AWS更改LINUX为ROOT权限密码登陆

  • first 使用密匙登录aws

    ssh -i x1keypair.pem ec2-user@52.10.205.109
  • 设置或者更改root密码

    [ec2-user@ip-172-31-34-97 ~]$ sudo passwd root
      Changing password for user root.
      New password: 
      Retype new password:
  • 更改/etc/ssh/sshd_config 配置

    vim /etc/ssh/sshd_config 
      find PermitRootLogin change PermitRootLogin yes 去掉注释
      find PasswordAuthentication change PasswordAuthentication yes 
      find UsePAM change UsePAM yes
  • 重启ssh 服务

    /sbin/service sshd restart
  • 最后 ,使用SecureCRT ,root 直接用密码连接aws

相关推荐