Bug 3066 - ConnectTimeout ignored for second IP address for host?
Summary: ConnectTimeout ignored for second IP address for host?
Status: CLOSED DUPLICATE of bug 2918
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 7.9p1
Hardware: Other Linux
: P5 enhancement
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-06 00:02 AEST by Jonathan Kamens
Modified: 2021-04-23 15:08 AEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Kamens 2019-09-06 00:02:52 AEST
If I do `ssh -v -o ConnectTimeout=1 -o StrictHostKeyChecking=no` to a host which has two addresses, one IPv4 and one IPv6, then it appears that the `ConnectTimout=1` setting is only obeyed for the first connection attempt:

```
$ ssh -v -o ConnectTimeout=1 -o StrictHostKeyChecking=no elided.host.name true 2>&1 | while read line; do echo "$(date) $line"; done
Thu 05 Sep 2019 09:57:52 AM EDT OpenSSH_7.9p1 Ubuntu-10, OpenSSL 1.1.1b  26 Feb 2019
Thu 05 Sep 2019 09:57:52 AM EDT debug1: Reading configuration data home/elided-username/.ssh/config
Thu 05 Sep 2019 09:57:52 AM EDT debug1: home/elided-username/.ssh/config line 13: Applying options for *
Thu 05 Sep 2019 09:57:52 AM EDT debug1: Reading configuration data /etc/ssh/ssh_config
Thu 05 Sep 2019 09:57:52 AM EDT debug1: /etc/ssh/ssh_config line 19: Applying options for *
Thu 05 Sep 2019 09:57:52 AM EDT debug1: Connecting to elided.host.name [elided:ipv6:address] port 22.
Thu 05 Sep 2019 09:57:53 AM EDT debug1: connect to address elided:ipv6:address port 22: Connection timed out
Thu 05 Sep 2019 09:57:53 AM EDT debug1: Connecting to elided.host.name [elided.ipv4.address] port 22.
Thu 05 Sep 2019 10:00:04 AM EDT debug1: connect to address elided.ipv4.address port 22: Connection timed out
Thu 05 Sep 2019 10:00:04 AM EDT ssh: connect to host elided.host.name port 22: Connection timed out
```
Comment 1 Damien Miller 2019-09-06 12:51:00 AEST

*** This bug has been marked as a duplicate of bug 2918 ***
Comment 2 Damien Miller 2021-04-23 15:08:45 AEST
closing resolved bugs as of 8.6p1 release