美文网首页
AWS服务器开启密码登陆

AWS服务器开启密码登陆

作者: 开发那点事 | 来源:发表于2015-10-28 17:33 被阅读400次

首先,修改一下pem文件的权限,因为只需要读,所以执行

   chmod 400 xxx.pem
   ssh -i xxx.pem ec2-user@YOUR_IP

登陆之后修改ROOT的密码

   sudo passwd root

修改sshd_config文件,开启「允许密码登陆」和「允许ROOT密码登陆」。

    # 修改/etc/ssh/sshd_config中的以下参数
    PermitRootLogin yes
    PasswordAuthentication yes
    UsePAM yes

重启服务器,以便让配置生效。

    sudo reboot

大概等一分钟之后再登陆。

专注数字货币、高并发、中间件。欢迎关注微信公众号。

image

相关文章

网友评论

      本文标题:AWS服务器开启密码登陆

      本文链接:https://www.haomeiwen.com/subject/qraxhttx.html