From f9f18dc6ed201bfa463ec9eb3868e2ed48a25700 Mon Sep 17 00:00:00 2001 From: Erwan MAS Date: Mon, 22 Jun 2020 19:03:37 +0000 Subject: [PATCH] options used by scp must be identical to options used by ssh --- src/inc/ssh.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inc/ssh.php b/src/inc/ssh.php index b4712f12..3b33bf9e 100644 --- a/src/inc/ssh.php +++ b/src/inc/ssh.php @@ -38,7 +38,7 @@ function scp_a_file($conf, $con, $ip_addr, $local_file, $remote_dest, $mode){ ssh2_scp_send($ssh, $local_file, $remote_dest, $mode); ssh2_disconnect($ssh); }else{ - $cmd = "scp -o \"StrictHostKeyChecking no\" -i /etc/openstack-cluster-installer/id_rsa $local_file root@$ip_addr:$remote_dest"; + $cmd = "scp -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null -o \"StrictHostKeyChecking no\" -i /etc/openstack-cluster-installer/id_rsa $local_file root@$ip_addr:$remote_dest"; $output = array(); $return_var = 0; exec($cmd, $output, $return_var); -- GitLab