WARNING: UNPROTECTED PRIVATE KEY FILE! when trying to SSH into Amazon EC2 Instance

前端 未结 11 2205
慢半拍i
慢半拍i 2020-12-12 11:06

I\'m working to set up Panda on an Amazon EC2 instance. I set up my account and tools last night and had no problem using SSH to interact with my own personal instance, but

11条回答
  •  隐瞒了意图╮
    2020-12-12 11:51

    To fix this,

    1. you’ll need to reset the permissions back to default:

      sudo chmod 600 ~/.ssh/id_rsa
      sudo chmod 600 ~/.ssh/id_rsa.pub
      

      If you are getting another error:

      • Are you sure you want to continue connecting (yes/no)? yes
      • Failed to add the host to the list of known hosts (/home/geek/.ssh/known_hosts).
    2. This means that the permissions on that file are also set incorrectly, and can be adjusted with this:

      sudo chmod 644 ~/.ssh/known_hosts
      
    1. Finally, you may need to adjust the directory permissions as well:

      sudo chmod 755 ~/.ssh
      

    This should get you back up and running.

提交回复
热议问题