Scp免除問題解決をつなぎ続けてもよろしいですか



Scp Exemption Are You Sure You Want Continue Connecting Problem Solving



初めてscpを使用するとき、接続を続行してもよろしいですか(はい/いいえ)?

[root@xxxxx temp]# scp root@xxxxx:/srv/kubernetes/ ./ The authenticity of host '192.168.14.227 (192.168.14.227)' can't be established. ECDSA key fingerprint is SHA256:MJkhAklmPIviNeFvkzS6a/NqQRiEOLzCnj/1En+gNVo. ECDSA key fingerprint is MD5:90:80:52:45:73:d0:a0:39:2b:fe:0b:18:62:f6:5a:f4. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.14.227' (ECDSA) to the list of known hosts. root@xxxxx's password: scp: /srv/kubernetes: not a regular file [root@xxxxx temp]# ll Total usage 4 -rw-r--r--. 1 root root 162 Mar 24 00:58 nginx-pod.yaml [root@xxxxx temp]# scp root@xxxxx:/srv/kubernetes/* ./ root@xxxxx's password: basic_auth.csv 100% 18 0.7KB/s 00:00 ca.crt 100% 1229 22.0KB/s 00:00

ホスト「111.222.333.444(111.222.333.444)」の信頼性を確立できません。
RSAキーのフィンガープリントはf3:cf:58:ae:71:0b:c8:04:6f:34:a3:b2:e4:1e:0c:8bです。
接続を続行してもよろしいですか(はい/いいえ)?



この問題を解決する方法はいくつかあります。

  1. パラメータを追加します。

ssh-o「StrictHostKeyCheckingno」root @ xxxxx



2.構成ファイルを変更します

以下をファイル/ etc / ssh / ssh_config(グローバル)または〜/ .ssh / config(ユーザー)に追加します。

StrictHostKeyCheckingは、コメントを開いてStrictHostKeyCheckingに変更するように依頼します。



[root@xxxxx temp]# cat /etc/ssh/ssh_config # Host * # ForwardAgent no # ForwardX11 no # RhostsRSAAuthentication no # RSAAuthentication yes # PasswordAuthentication yes # HostbasedAuthentication no # GSSAPIAuthentication no # GSSAPIDelegateCredentials no # GSSAPIKeyExchange no # GSSAPITrustDNS no # BatchMode no # CheckHostIP yes # AddressFamily any # ConnectTimeout 0 # StrictHostKeyChecking ask # IdentityFile ~/.ssh/identity

ホストを制限する

For some machine access Host 192.168.0.* StrictHostKeyChecking no or All visits Host * StrictHostKeyChecking no