Skip to content

Commit

Permalink
Updates ssh-copy-id to proper argument order (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eagerod authored Feb 22, 2025
1 parent dae9f55 commit 7159757
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/hope/unix_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7159757

Please sign in to comment.