[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/12: ssh: Add #:connection-timeout parameter to 'open-ssh-session'.
From: |
guix-commits |
Subject: |
03/12: ssh: Add #:connection-timeout parameter to 'open-ssh-session'. |
Date: |
Tue, 14 Jun 2022 18:28:09 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 3d0749b4e30dfbbdfc9c365e8ab8f7bebaa96fd7
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Jun 14 09:02:43 2022 +0200
ssh: Add #:connection-timeout parameter to 'open-ssh-session'.
* guix/ssh.scm (open-ssh-session): Add #:connection-timeout parameter
and honor it.
---
guix/ssh.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/guix/ssh.scm b/guix/ssh.scm
index 232b6bfe94..a6f0f2eb96 100644
--- a/guix/ssh.scm
+++ b/guix/ssh.scm
@@ -102,7 +102,8 @@ actual key does not match."
(define* (open-ssh-session host #:key user port identity
host-key
(compression %compression)
- (timeout 3600))
+ (timeout 3600)
+ (connection-timeout 10))
"Open an SSH session for HOST and return it. IDENTITY specifies the file
name of a private key to use for authenticating with the host. When USER,
PORT, or IDENTITY are #f, use default values or whatever '~/.ssh/config'
@@ -112,15 +113,16 @@ When HOST-KEY is true, it must be a string like
\"ssh-ed25519 AAAAC3Nz…
root@example.org\"; the server is authenticated and an error is raised if its
host key is different from HOST-KEY.
-Install TIMEOUT as the maximum time in seconds after which a read or write
-operation on a channel of the returned session is considered as failing.
+Error out if connection establishment takes more than CONNECTION-TIMEOUT
+seconds. Install TIMEOUT as the maximum time in seconds after which a read or
+write operation on a channel of the returned session is considered as failing.
Throw an error on failure."
(let ((session (make-session #:user user
#:identity identity
#:host host
#:port port
- #:timeout 10 ;seconds
+ #:timeout connection-timeout
;; #:log-verbosity 'protocol
;; Prevent libssh from reading
- branch master updated (13c46cc29d -> 8a04ac4b2f), guix-commits, 2022/06/14
- 04/12: services: configuration: Support (field1 maybe-number "") format., guix-commits, 2022/06/14
- 01/12: pull: Tweak cache directory validation code., guix-commits, 2022/06/14
- 08/12: gnu: libadwaita: Update to 1.1.0., guix-commits, 2022/06/14
- 09/12: gnu: rtmidi: Add version 5.0.0., guix-commits, 2022/06/14
- 10/12: gnu: libwesockets: Update license., guix-commits, 2022/06/14
- 02/12: system: <operating-system> compiler truly honors the 'system' argument., guix-commits, 2022/06/14
- 03/12: ssh: Add #:connection-timeout parameter to 'open-ssh-session'.,
guix-commits <=
- 05/12: services: configuration: Use *unspecified* instead of 'disabled., guix-commits, 2022/06/14
- 06/12: doc: Follow the 'disabled -> *unspecified* configuration refactor., guix-commits, 2022/06/14
- 11/12: gnu: Add kismet., guix-commits, 2022/06/14
- 12/12: gnu: slurm: Update to 22.05.1., guix-commits, 2022/06/14
- 07/12: gnu: lttng-ust: Fix dependencies., guix-commits, 2022/06/14