diff --git a/guix/scripts/copy.scm b/guix/scripts/copy.scm index 67975ac1a9b..116583590f1 100644 --- a/guix/scripts/copy.scm +++ b/guix/scripts/copy.scm @@ -75,8 +75,7 @@ package names, build the underlying packages before sending them." (options->derivations+files local opts))) (warn-if-empty items) (and (build-derivations local drv) - (let* ((session (open-ssh-session host #:user user - #:port (or port 22))) + (let* ((session (open-ssh-session host #:user user #:port port)) (remote (connect-to-remote-daemon session)) (sent (send-files local items remote #:recursive? #t))) @@ -89,7 +88,7 @@ package names, build the underlying packages before sending them." (let*-values (((user host port) (ssh-spec->user+host+port source)) ((session) - (open-ssh-session host #:user user #:port (or port 22))) + (open-ssh-session host #:user user #:port port)) ((remote) (connect-to-remote-daemon session))) ;; TODO: Here we could to compute and build the derivations on REMOTE diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm index 56e1ab61aaa..462c3dfc0c0 100644 --- a/guix/scripts/offload.scm +++ b/guix/scripts/offload.scm @@ -234,7 +234,7 @@ number of seconds after which the connection times out." #:knownhosts "/dev/null" ;; Likewise for ~/.ssh/config. - #:config "/dev/null" + #:config #f ;; We need lightweight compression when ;; exchanging full archives. diff --git a/guix/ssh.scm b/guix/ssh.scm index 20a35b2712f..5b949baaa26 100644 --- a/guix/ssh.scm +++ b/guix/ssh.scm @@ -143,10 +143,6 @@ Throw an error on failure." ;; TCP_NODELAY. #:nodelay #t #:stricthostkeycheck strict-host-key-check?))) - - ;; Honor ~/.ssh/config. - (session-parse-config! session) - (match (connect! session) ('ok (if host-key @@ -187,7 +183,9 @@ to SSH server at '~a'") (x ;; Connection failed or timeout expired. (raise (formatted-message (G_ "SSH connection to '~a' port ~a failed: ~a~%") - host (or port 22) (get-error session))))))) + host + (session-get session 'port) + (get-error session))))))) (define* (remote-inferior session #:optional become-command) "Return a remote inferior for the given SESSION. If BECOME-COMMAND is diff --git a/guix/store/ssh.scm b/guix/store/ssh.scm index 09c0832505b..7e6371acbca 100644 --- a/guix/store/ssh.scm +++ b/guix/store/ssh.scm @@ -33,7 +33,7 @@ "Connect to the SSH daemon at URI, a URI object with the 'ssh' scheme." (remote-daemon-channel (open-ssh-session (uri-host uri) - #:port (or (uri-port uri) 22) + #:port (uri-port uri) #:user (uri-userinfo uri)))) ;;; ssh.scm ends here