Skip to content

test_accept_enforce_host_keys fails with check_host_keys='accept' on recent /usr/bin/ssh versions #756

Closed

Description

@moreati

On Ubuntu 20.04 ssh has a new third option when it prompts for an unknown host key:

± ssh gist.github.com
The authenticity of host 'gist.github.com (64:ff9b::8c52:7903)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no/[fingerprint])?

This string is no longer matched by HOSTKEY_REQ_PATTERN, causing SshTest.test_accept_enforce_host_keys() to fail thus

======================================================================
ERROR: test_accept_enforce_host_keys (ssh_test.SshTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/alex/src/mitogen/tests/ssh_test.py", line 161, in test_accept_enforce_host_keys
    check_host_keys='accept',
  File "/home/alex/src/mitogen/tests/testlib.py", line 544, in docker_ssh
    return self.router.ssh(**kwargs)
  File "/home/alex/src/mitogen/mitogen/parent.py", line 2502, in ssh
    return self.connect(u'ssh', **kwargs)
  File "/home/alex/src/mitogen/mitogen/parent.py", line 2444, in connect
    return self._connect(klass, **mitogen.core.Kwargs(kwargs))
  File "/home/alex/src/mitogen/mitogen/parent.py", line 2426, in _connect
    raise mitogen.core.StreamError(self.connection_timeout_msg)
mitogen.core.StreamError: Connection timed out.

----------------------------------------------------------------------

Activity

  1. added 2 commits that reference this issue on Nov 8, 2020
    32f4af7
    b0ce29d
  2. added a commit that references this issue on Nov 11, 2020
    6d949fe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions