From adede52a99ca8560ab1ee638f752aa85f1c62b5a Mon Sep 17 00:00:00 2001 From: Wolfgang Link Date: Tue, 2 Aug 2016 12:24:49 +0200 Subject: [PATCH] Add ssh BatchMode. In case of connection lost the ssh keeps the zfs receive running and it is not possible to make a new sync. --- pve-zsync | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pve-zsync b/pve-zsync index 16528ac..f40971c 100644 --- a/pve-zsync +++ b/pve-zsync @@ -881,7 +881,7 @@ sub send_image { my $cmd = []; - push @$cmd, 'ssh', "root\@$source->{ip}", '--' if $source->{ip}; + push @$cmd, 'ssh', '-o', 'BatchMode=yes', "root\@$source->{ip}", '--' if $source->{ip}; push @$cmd, 'zfs', 'send'; push @$cmd, '-v' if $param->{verbose}; @@ -898,7 +898,7 @@ sub send_image { $target =~ s!/+!/!g; push @$cmd, \'|'; - push @$cmd, 'ssh', "root\@$dest->{ip}", '--' if $dest->{ip}; + push @$cmd, 'ssh', '-o', 'BatchMode=yes', "root\@$dest->{ip}", '--' if $dest->{ip}; push @$cmd, 'zfs', 'recv', '-F', '--'; push @$cmd, "$target"; -- 2.39.2