Linux下解决 id_rsa 权限不够

时间:2023-03-10 00:17:40
Linux下解决 id_rsa 权限不够

问题

  1. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  2. @         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
  3. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  4. Permissions 0644 for '/home/robin/.ssh/id_rsa' are too open.
  5. It is recommended that your private key files are NOT accessible by others.
  6. This private key will be ignored.
  7. bad permissions: ignore key: /home/robin/.ssh/id_rsa

解决方案

    1. chmod 755 ~/.ssh/
    2. chmod 600 ~/.ssh/id_rsa ~/.ssh/id_rsa.pub
    3. chmod 644 ~/.ssh/known_hosts