Running EC2 instance suddenly refuses SSH connection

后端 未结 9 844
小鲜肉
小鲜肉 2020-12-14 08:42

I\'ve set up the EC2 instance couple days ago and even last night I was able to SSH to it with no problems. Today morning, I can\'t ssh to it. Port 22 is already open in the

9条回答
  •  -上瘾入骨i
    2020-12-14 09:10

    Had the same issue, but sys logs had this:

    Starting sshd: /var/empty/sshd must be owned by root and not group or world-writable. [FAILED]

    Used the same steps described above to detach volume and attach to connectable instance. Then used:

    sudo chmod 755 /var/empty/sshd

    sudo chown root:root /var/empty/sshd

    (https://support.microsoft.com/en-us/help/4092816/ssh-fails-because-var-empty-sshd-is-not-owned-by-root-and-is-not-group)

    Then detached and reattached to original EC2 Instance and could now access via ssh.

提交回复
热议问题