-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Errno 54] Connection reset by peer with asyncssh>=2.2 #276
Comments
There was a recent issue related to AsyncSSH 2.2.0 and later not working with dropbear SSH, when RSA keys are used. The problem had to do with Dropbear giving up if it doesn't find a matching server host key algorithm in the first 20 algorithms sent by the client, and AsyncSSH 2.2.0 now having 22 algorithms that it supports, with ssh-rsa being one of the last in the list. So, dropbear stops before it finds a matching algorithm. If this is the problem you're seeing, the workaround is to explicitly set server_host_key_algs=['ssh-rsa'] when you call asyncssh.connect(), or at least move that algorithm closer to the front of the list. See #263 for more details. If this doesn't solve your problem, you may be seeing something related to #274, but I haven't been able to reproduce that one yet. So, I'm not sure what is happening there. |
Thank you for your efficient response! The server_host_key_algs=["ssh-rsa"] solution works well with my 2 modems! I close the issue. |
Glad to hear that worked - thanks for confirming! |
Hello,
I have a problem with asyncssh >=2.2
I make SSH connections with modems.
On some models I have reset problems.
Asyncssh 2.2.0 or 2.2.1
Modem A : Ok
Modem B : [Errno 54] Connection reset by peer
Asyncssh 2.1.0
Modem A : Ok
Modem B : Ok
So the problem depends on the version of asyncssh and the modem model....
No logs on modem. The connection is reseted before login
Code is very simple
async with asyncssh.connect(ip, port=port, username=username, password=password, known_hosts=None) as conn:
return await conn.run("/usr/sbin/gsmctl -i -q -f -J -t -c -F -a -w -m")
Wireshark Asyncssh 2.2.1
Wireshark Asyncssh 2.1.0
Have you an idea ?
MacOS Catalina 10.15.4
Python 3.7.4
The text was updated successfully, but these errors were encountered: