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

前端 未结 11 2189
慢半拍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 12:00

    The private key file should be protected. In my case i have been using the public_key authentication for a long time and i used to set the permission as 600 (rw- --- ---) for private key and 644 (rw- r-- r--) and for the .ssh folder in the home folder you will have 700 permission (rwx --- ---). For setting this go to the user's home folder and run the following command


    Set the 700 permission for .ssh folder

    chmod 700 .ssh
    


    Set the 600 permission for private key file

    chmod 600 .ssh/id_rsa
    


    Set 644 permission for public key file

    chmod 644 .ssh/id_rsa.pub
    

提交回复
热议问题