ホスト鍵の検証に失敗したため、rsync+rsync が失敗しました。

ホスト鍵の検証に失敗したため、rsync+rsync が失敗しました。

リモートサーバーrsyncから別のサーバーにファイルを転送するために使用しています。/etc/yum.repos.d//etc/yum.repos.d/

sshpass -p $password rsync -av /etc/yum.repos.d/* root@server_one.usaga.com:/etc/yum.repos.d
Host key verification failed.
rsync error: explained error (code 255) at rsync.c(551) [sender=3.0.9]

上で見たように、rsyncキー指紋のために失敗します。

だから私たちは次のことをした後(yessshを通して答えました)

ssh root@server_one.usaga.com
The authenticity of host 'server_one.usaga.com (43.3.22.4)' can't be established.
ECDSA key fingerprint is 08:b1:c7:fa:c3:a8:8f:ce:85:4f:b9:ac:b1:8a:6a:87.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'server_one.usaga.com,43.3.22.4' (ECDSA) to the list of known hosts.

もう一度実行してみてくださいrsync。動作します。

sshpass -p $password rsync -av /etc/yum.repos.d/* root@server_one.usaga.com:/etc/yum.repos.d
sending incremental file list
.
.
.

sent 378 bytes  received 112 bytes  326.67 bytes/sec
total size is 1937  speedup is 3.95

だからもう一度アップグレードrsync

rsync無視するにはどのフラグを設定する必要がありますかkey fingerprint

または、用量のrsync懸念を無視することができます - Are you sure you want to continue connecting (yes/no)?はい

ベストアンサー1

sshを使用する代わりに、-e追加オプションを持つsshを含むrsyncに別のリモートシェルを指定できるため、追加が-e "ssh -o StrictHostKeyChecking=no"機能します。

おすすめ記事