[Twisted-Python] conch bytes/str traceback when /etc/ssh/moduli is not present
Glyph
glyph at twistedmatrix.com
Thu Mar 4 11:51:31 MST 2021
Even if we want a traceback, a TypeError on str/bytes seems like the wrong kind to have. Please file a bug (and open a PR, if you can :-)).
-g
> On Mar 4, 2021, at 10:24 AM, Werner Thie <werner at thieprojects.ch> wrote:
>
> Aloha
>
> should the case of a missing moduli file be handled more gracefully than
> with a traceback or is this a bug?
>
> I was running into this problem when installing on different OSs with
> OSX and FreeBSD not having an /etc/ssh/moduli file by default.
>
> Mahalo, Werner
>
> 2021-03-04T15:04:51+0100 [builtins.ConchSSHFactory#info] disabling
> non-fixed-group key exchange algorithms because we cannot find moduli file
> 2021-03-04T15:04:51+0100 [builtins.ConchSSHFactory] Unhandled Error
> Traceback (most recent call last):
> File
> "/Users/anon/.pyenv/versions/3.7.10/lib/python3.7/site-packages/twisted/python/log.py",
> line 85, in callWithContext
> return context.call({ILogContext: newCtx}, func, *args, **kw)
> File
> "/Users/anon/.pyenv/versions/3.7.10/lib/python3.7/site-packages/twisted/python/context.py",
> line 118, in callWithContext
> return self.currentContext().callWithContext(ctx, func, *args,
> **kw)
> File
> "/Users/anon/.pyenv/versions/3.7.10/lib/python3.7/site-packages/twisted/python/context.py",
> line 83, in callWithContext
> return func(*args, **kw)
> File
> "/Users/anon/.pyenv/versions/3.7.10/lib/python3.7/site-packages/twisted/internet/selectreactor.py",
> line 149, in _doReadOrWrite
> why = getattr(selectable, method)()
> --- <exception caught here> ---
> File
> "/Users/anon/.pyenv/versions/3.7.10/lib/python3.7/site-packages/twisted/internet/tcp.py",
> line 1403, in doRead
> protocol.makeConnection(transport)
> File
> "/Users/anon/.pyenv/versions/3.7.10/lib/python3.7/site-packages/twisted/internet/protocol.py",
> line 508, in makeConnection
> self.connectionMade()
> File
> "/Users/anon/.pyenv/versions/3.7.10/lib/python3.7/site-packages/twisted/conch/ssh/transport.py",
> line 512, in connectionMade
> self.sendKexInit()
> File
> "/Users/anon/.pyenv/versions/3.7.10/lib/python3.7/site-packages/twisted/conch/ssh/transport.py",
> line 535, in sendKexInit
> NS(b",".join(self.supportedPublicKeys)),
> builtins.TypeError: sequence item 0: expected a bytes-like object,
> str found
>
> 2021-03-04T15:04:51+0100
> [twisted.conch.ssh.transport.SSHServerTransport#info] Disconnecting with
> error, code 3
> reason: b"couldn't match all kex parts"
> 2021-03-04T15:04:51+0100
> [twisted.conch.ssh.transport.SSHServerTransport#info] connection lost
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
More information about the Twisted-Python
mailing list