ssh接続の際に「The authenticity of host [XX....] can't be established.」が発生

問題点

sshでサーバに接続する際に以下のようなエラー文が発生

The authenticity of host '[XX.XX.XX.XX]:XX [XX.XX.XX.XX]:XX' can't be established.
ECDSA key fingerprint is SHA256:hogehogehogehogehogehogehogehogehogehogheog.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[XX.XX.XX.XX]:XXXX' (ECDSA) to the list of known hosts.

解決策

~/.ssh/config ファイルのパーミッションの権限の問題だったよう。
configは600にするものらしい。

$ chmod 600 ~/.ssh/config

参考