diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-10-18 18:10:47 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-10-18 18:10:47 +0200 |
commit | b95d1b3289a6bb8e346a47e750660e16fb201c57 (patch) | |
tree | cd4d956436f21d77645fd795d3e9737e4892c1d3 /guix/ssh.scm | |
parent | a1d1703a1dc6bfcd10f48fe707ee7ac65300a37d (diff) | |
parent | dabcfc6de29032ea52d1cb54163a783f7e480167 (diff) | |
download | guix-patches-b95d1b3289a6bb8e346a47e750660e16fb201c57.tar guix-patches-b95d1b3289a6bb8e346a47e750660e16fb201c57.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'guix/ssh.scm')
-rw-r--r-- | guix/ssh.scm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/guix/ssh.scm b/guix/ssh.scm index b6b55bdfcb..5fd3c280e8 100644 --- a/guix/ssh.scm +++ b/guix/ssh.scm @@ -61,11 +61,16 @@ "zlib@openssh.com,zlib") (define* (open-ssh-session host #:key user port identity - (compression %compression)) + (compression %compression) + (timeout 3600)) "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' -specifies; otherwise use them. Throw an error on failure." +specifies; otherwise use them. 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 @@ -86,6 +91,7 @@ specifies; otherwise use them. Throw an error on failure." ;; Use public key authentication, via the SSH agent if it's available. (match (userauth-public-key/auto! session) ('success + (session-set! session 'timeout timeout) session) (x (disconnect! session) |