From 1e001fb571d9aad7d61b2a6a76a160b48f293650 Mon Sep 17 00:00:00 2001 From: Devansh-567 Date: Mon, 22 Jun 2026 12:18:32 +0530 Subject: [PATCH] Fix ssh option configuration ordering for snbk ssh-push targets --- client/snbk/BackupConfig.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/snbk/BackupConfig.cc b/client/snbk/BackupConfig.cc index 5195da1b..35b2633e 100644 --- a/client/snbk/BackupConfig.cc +++ b/client/snbk/BackupConfig.cc @@ -107,7 +107,7 @@ namespace snapper vector BackupConfig::ssh_options() const { - vector options = { ssh_host }; + vector options; if (ssh_port != 0) options.insert(options.end(), { "-p", to_string(ssh_port) }); @@ -122,6 +122,9 @@ namespace snapper options.insert(options.end(), { "-o", "ControlMaster=auto", "-o", "ControlPath=\"~/.ssh/snbk-%C\"", "-o", "ControlPersist=30s" }); + // The target host must be the final argument before the command string execution block + options.push_back(ssh_host); + return options; } -- 2.47.3