AWS SSH connection error: Permission denied (publickey)

后端 未结 9 1639
隐瞒了意图╮
隐瞒了意图╮ 2020-12-07 22:58

Im trying to connect to my EC2 instance with SSH and Iḿ getting crazy. I have read this post and tried all user combinations:

AWS ssh access 'Permission denied (

相关标签:
9条回答
  • 2020-12-07 23:49

    Another thing to check is PermitRootLogin and AllowUsers in /etc/ssh/sshd_config.

    This debug1: key_parse_private2: missing begin marker appears even after successful key authorization if your user access restricted.

    0 讨论(0)
  • 2020-12-07 23:50

    You are probably logging in as the wrong user. If it's a Ubuntu instance the command would be:

    ssh -v -i ec2-key-pair.pem ubuntu@ec2-54-72-242-0.eu-west-1.compute.amazonaws.com
    
    0 讨论(0)
  • 2020-12-07 23:50

    I had a similar issue, "key_parse_private2: missing begin marker" while using username 'ec2-user' but it got fixed when I changed to ubuntu as the user.

    0 讨论(0)
提交回复
热议问题