diff --git a/guix/ssh.scm b/guix/ssh.scm index 457d1890f9..b39b90f733 100644 --- a/guix/ssh.scm +++ b/guix/ssh.scm @@ -302,8 +302,13 @@ (define* (connect-to-remote-daemon session "/var/guix/daemon-socket/socket")) "Connect to the remote build daemon listening on SOCKET-NAME over SESSION, an SSH session. Return a object." - (open-connection #:port (remote-daemon-channel session socket-name))) - + (guard (c ((store-connection-error? c) + ;; Raise a more focused error condition. + (raise (formatted-message + (G_ "failed to connect over SSH to daemon at '~a', socket ~a") + (session-get session 'host) + socket-name)))) + (open-connection #:port (remote-daemon-channel session socket-name)))) (define (store-import-channel session) "Return an output port to which archives to be exported to SESSION's store