24
19

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 3 years have passed since last update.

SSHコマンド実行時に生じたBad owner or permissions on /home/(user_name)/.ssh/config エラーの対処法

Posted at

EC2インスタンスにsshしようとした所、エラーが発生

環境は以下の通り

  • Ubuntu 16.04
  • OpenSSH_7.2p2 Ubuntu-4ubuntu2.10 OpenSSL 1.0.2g
実行コマンド
ssh (Hostname)
エラー文
Bad owner or permissions on /home/(user_name)/.ssh/config

原因

~/.ssh/config の権限のセキュリティが甘くなっている場合(chmod 777等)、
sshコマンド実行時に
Bad owner or permissions on /home/(user_name)/.ssh/configエラーを返す。

解決法

~/.ssh/configの権限を所有者の読み書きに制限した所、エラーが消えて正常に動作するようになった。

解決法
$ chmod 600 ~/.ssh/config
24
19
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
24
19

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?