Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ssh-ng: Set log-fd for ssh to
4
by default
That's expected by `build-remote` and makes sure that errors are correctly forwarded to the user. For instance, let's say that the host-key of `example.org` is unknown and nix-build ../nixpkgs -A hello -j0 --builders 'ssh-ng://example.org' is issued, then you get the following, somewhat cryptic error: error: cannot open connection to remote store 'ssh-ng://example.org': error: unexpected end-of-file The relevant information (`Host key verification failed`) ends up in the daemon's log, but that's not very obvious considering that the daemon isn't very chatty normally. This can be fixed - the same way as its done for legacy-ssh - by passing fd 4 to the SSH wrapper. Now you'd get the following error: error: cannot open connection to remote store 'ssh-ng://example.org': error: unexpected end-of-file: Host key verification failed. ...and now it's clear what's wrong.
- Loading branch information