Skip to content

Commit b0ce29d

Browse files
committed
ssh: Match newer ssh host key prompt that accepts the fingerprint
This fixes an ERROR in test_accept_enforce_host_keys() while running the test suite. Fixes #756
1 parent a60c6c1 commit b0ce29d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

docs/changelog.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ v0.2.10 (unreleased)
2121
To avail of fixes in an unreleased version, please download a ZIP file
2222
`directly from GitHub <https://github.com/dw/mitogen/>`_.
2323

24-
*(no changes)*
24+
* :gh:issue:`756` ssh connections with `check_host_keys='accept'` would
25+
timeout, when using recent OpenSSH client versions.
2526

2627

2728
v0.2.9 (2019-11-02)

mitogen/ssh.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@
7272
)
7373

7474
HOSTKEY_REQ_PATTERN = re.compile(
75-
b(r'are you sure you want to continue connecting \(yes/no\)\?'),
75+
b(
76+
r'are you sure you want to continue connecting '
77+
r'\(yes/no(?:/\[fingerprint\])?\)\?'
78+
),
7679
re.I
7780
)
7881

0 commit comments

Comments
 (0)