2
3

More than 3 years have passed since last update.

RSA 公開鍵認証による SSH 接続でエラーが出る場合の対処法

Last updated at Posted at 2019-09-17

SSH コマンドの実行時、次のようなエラーが出る場合には、

Bad owner or permissions on /****/****/.ssh/config

以下のコマンドを実行してみてください。

$ chmod 600 ~/.ssh/config

また、例えば、以下のようなエラーが出た場合は、

Permissions 0777 for '/****/****/.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 "/****/****/.ssh/id_rsa": bad permissions
****@****: Permission denied (publickey).

次のコマンドを実行します。

$ chmod 600 ~/.ssh/id_rsa

つまり、SSH の設定ファイルや RSA 秘密鍵に関しては、

アクセス権限がゆる過ぎても、パーミッションエラーになるということのようです。

2
3
2

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
3