diff --git a/internal/sshmanager/deploy.go b/internal/sshmanager/deploy.go index 1ebe82a..30338ee 100644 --- a/internal/sshmanager/deploy.go +++ b/internal/sshmanager/deploy.go @@ -140,12 +140,11 @@ func DeployKeysToMachine(ctx context.Context, serverKeyPath string, host string, result.Messages = append(result.Messages, fmt.Sprintf("Uploaded %s to %s:%s", filepath.Base(k.LocalPath), host, k.RemotePath)) } - if len(knownHostsHosts) > 0 { + if len(knownHostsHosts) > 0 { for _, khHost := range knownHostsHosts { session2, err := conn.NewSession() if err != nil { result.Errors = append(result.Errors, fmt.Sprintf("session for ssh-keyscan %s: %v", khHost, err)) - result.Success = false continue } session2.Stdout = &stdout @@ -155,7 +154,6 @@ func DeployKeysToMachine(ctx context.Context, serverKeyPath string, host string, if err != nil { slog.Warn("deploy: ssh-keyscan failed", "host", khHost, "error", err) result.Errors = append(result.Errors, fmt.Sprintf("ssh-keyscan %s: %v (stderr: %s)", khHost, err, stderr.String())) - result.Success = false } else { result.Messages = append(result.Messages, fmt.Sprintf("Populated known_hosts with %s", khHost)) }