required for rsync's --rsh
---
 data/PVE/Cluster.pm | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/data/PVE/Cluster.pm b/data/PVE/Cluster.pm
index 731acc5..05897ed 100644
--- a/data/PVE/Cluster.pm
+++ b/data/PVE/Cluster.pm
@@ -1877,15 +1877,21 @@ sub get_ssh_info {
     };
 }
 
-sub ssh_info_to_command {
+sub ssh_info_to_command_base {
     my ($info, @extra_options) = @_;
     return [
        '/usr/bin/ssh',
        '-o', 'BatchMode=yes',
        '-o', 'HostKeyAlias='.$info->{name},
-       @extra_options,
-       "root\@$info->{ip}"
+       @extra_options
     ];
 }
 
+sub ssh_info_to_command {
+    my ($info, @extra_options) = @_;
+    my $cmd = ssh_info_to_command_base($info, @extra_options);
+    push @$cmd, "root\@$info->{ip}";
+    return $cmd;
+}
+
 1;
-- 
2.11.0


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to