2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

SSHするとThis private key will be ignored.というエラーが出る

Posted at

はじめに

時間がないため雑にまとめていきます(ごめんなさい)
またSSHのプライベートキーが正しいのに読み込めないときの1つの原因も消化しています

問題

SSHで以下のエラーが発生しました

Permissions 0775 for '/home/watanabejin/.ssh/id_rsa' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/home/watanabejin/.ssh/id_rsa": bad permissions

解決方法

$ sudo chmod 600 ~/.ssh/id_rsa

で権限をつけたらうまく行きました

でもなぜかできない

なぜかアクセスができませんでした
そこでPrivateKeyをみたところ

hogehogepipi
-----END OPENSSH PRIVATE KEY-----

となっており、正しくは

hogehogepipi
-----END OPENSSH PRIVATE KEY-----


と下に2行開けていないとなりませんでした

おわりに

明日から沖縄にワーケーションしにいくのでうずうずしていたため、雑にまとめました

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?