diff options
author | djm@openbsd.org <djm@openbsd.org> | 2023-10-12 00:42:26 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2023-10-12 01:00:13 +0200 |
commit | a752a6c0e1001f93696d7025f0c867f0376e2ecf (patch) | |
tree | dbe5b78436bc288efe6f458e167864f38056f768 /ssh.c | |
parent | upstream: add support for reading ED25519 private keys in PEM PKCS8 (diff) | |
download | openssh-a752a6c0e1001f93696d7025f0c867f0376e2ecf.tar.xz openssh-a752a6c0e1001f93696d7025f0c867f0376e2ecf.zip |
upstream: add ChannelTimeout support to the client, mirroring the
same option in the server. ok markus@
OpenBSD-Commit-ID: 55630b26f390ac063980cfe7ad8c54b03284ef02
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.594 2023/09/03 23:59:32 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.595 2023/10/11 22:42:26 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1573,6 +1573,20 @@ main(int ac, char **av) else timeout_ms = options.connection_timeout * 1000; + /* Apply channels timeouts, if set */ + channel_clear_timeouts(ssh); + for (j = 0; j < options.num_channel_timeouts; j++) { + debug3("applying channel timeout %s", + options.channel_timeouts[j]); + if (parse_pattern_interval(options.channel_timeouts[j], + &cp, &i) != 0) { + fatal_f("internal error: bad timeout %s", + options.channel_timeouts[j]); + } + channel_add_timeout(ssh, cp, i); + free(cp); + } + /* Open a connection to the remote host. */ if (ssh_connect(ssh, host, options.host_arg, addrs, &hostaddr, options.port, options.connection_attempts, |