Commit eb749be
committed
Windows: write SSH keys with LF endings — CRLF keys are rejected (#347)
Remote SSH repos failed from Windows agents with 'Connection closed by
remote host. Is borg working on the server?' while local repos worked
and Linux agents used the same remote host fine. The per-job remote SSH
key is normalized to LF and then written with text-mode open(), which
on Windows converts every newline back to CRLF — and OpenSSH rejects
CRLF private keys ('invalid format'), so pubkey auth never happens and
the remote host closes the connection. Local backups were unaffected
only because the installer downloads the agent's own key byte-for-byte.
All five key writes (agent key download fallback, backup task, and the
three database-restore handlers) now open with newline="\n", which
disables newline translation on every platform.1 parent e50d300 commit eb749be
1 file changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
601 | | - | |
| 601 | + | |
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
| |||
2573 | 2573 | | |
2574 | 2574 | | |
2575 | 2575 | | |
2576 | | - | |
| 2576 | + | |
2577 | 2577 | | |
2578 | 2578 | | |
2579 | 2579 | | |
| |||
2790 | 2790 | | |
2791 | 2791 | | |
2792 | 2792 | | |
2793 | | - | |
| 2793 | + | |
2794 | 2794 | | |
2795 | 2795 | | |
2796 | 2796 | | |
| |||
3020 | 3020 | | |
3021 | 3021 | | |
3022 | 3022 | | |
3023 | | - | |
| 3023 | + | |
3024 | 3024 | | |
3025 | 3025 | | |
3026 | 3026 | | |
| |||
3593 | 3593 | | |
3594 | 3594 | | |
3595 | 3595 | | |
3596 | | - | |
| 3596 | + | |
3597 | 3597 | | |
3598 | 3598 | | |
3599 | 3599 | | |
| |||
0 commit comments