SSH Key: “Permissions 0644 for 'id_rsa.pub' are too open.” on mac

后端 未结 17 2095
[愿得一人]
[愿得一人] 2020-11-28 00:50

I generate a ssh key pair on my mac and add the public key to my ubuntu server(in fact, it is a virtual machine on my mac),but when I try to login the ubuntu server,it says:

17条回答
  •  北海茫月
    2020-11-28 01:37

    Lot's of similar answers but no explanations...

    The error is thrown because the private key file permissions are too open. It is a security risk.

    Change the permissions on the private key file to be minimal (read only by owner)

    1. Change owner chown
    2. Set minimal permissions (read only to file owner) chmod 400

提交回复
热议问题