diff --git a/asyncssh/connection.py b/asyncssh/connection.py index eca92c1..6166984 100644 --- a/asyncssh/connection.py +++ b/asyncssh/connection.py @@ -2501,6 +2501,13 @@ def _process_userauth_banner(self, _pkttype: int, _pktid: int, msg_bytes = packet.get_string() lang_bytes = packet.get_string() + + # Work around an extra NUL byte appearing in the user + # auth banner message in some versions of cryptlib + if b'cryptlib' in self._server_version and \ + packet.get_remaining_payload() == b'\0': # pragma: no cover + packet.get_byte() + packet.check_end() try: