$ ssh -T git@github.com
The authenticity of host 'github.com (XX.XX.XX.XX)' can't be established.
RSA key fingerprint is SHA256:XXXXXXXXXXXXXXX...XXXXXXX.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
こんな感じの質問を受けたくないときがあるので、勝手に許可してくれるようにしたいです。
以下のように-o "StrictHostKeyChecking no"
オプションをつけます。
$ ssh -o "StrictHostKeyChecking no" -T git@github.com
Warning: Permanently added 'github.com,XX.XX.XX.XX' (RSA) to the list of known hosts.
Hi USERNAME! You've successfully authenticated, but GitHub does not provide shell access.
自動で動いてほしいスクリプトの中などで使うと便利です。