1
0

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.

「Are you sure you want to continue connecting」を聞かれなくする

Last updated at Posted at 2020-01-27

オートスケールインスタンスなどへrsyncする際など、初回だと聞かれてバッチが失敗するのでその対策

.ssh/configの設定に

StrictHostKeyChecking no

を対象ホストへの設定へ追加する

20/01/28追記
EC2起動時のユーザーデータでのrsyncが上手くいかなかった
「/var/log/cloud-init-output.log」「/var/log/cloud-init.log」を確認したところ以下のログが

Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [Receiver=3.1.2]

これはユーザーデータ起動時の実行ユーザーがrootのために起こるのだが、同じ方法で解決が可能だった

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?