From 715975773dc932690f336241ad8a7f3a79743835 Mon Sep 17 00:00:00 2001 From: Aleem Haji Date: Sat, 22 Feb 2025 00:03:44 -0500 Subject: [PATCH] Updates ssh-copy-id to proper argument order (#73) --- pkg/hope/unix_config.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/hope/unix_config.go b/pkg/hope/unix_config.go index 2e187d6..ee670b7 100644 --- a/pkg/hope/unix_config.go +++ b/pkg/hope/unix_config.go @@ -126,8 +126,12 @@ func TryConfigureSSH(log *logrus.Entry, node *Node) error { } func CopySSHKeyToAuthorizedKeys(log *logrus.Entry, node *Node) error { - connectionString := node.ConnectionString() - osCmd := exec.Command("ssh-copy-id", connectionString, "-o", "StrictHostKeyChecking=no") + args := []string{ + "-o", "StrictHostKeyChecking=no", + node.ConnectionString(), + } + log.Debug("ssh-copy-id ", strings.Join(args, " ")) + osCmd := exec.Command("ssh-copy-id", args...) osCmd.Stdin = os.Stdin osCmd.Stdout = os.Stdout osCmd.Stderr = os.Stderr