-
Notifications
You must be signed in to change notification settings - Fork 25
FAQ
Nicolas Couture edited this page Apr 19, 2026
·
1 revision
This typically means your SSH client and the mock server cannot agree on a Key Exchange (KEX) or host key algorithm.
-
Solution: Ensure you are using a modern SSH client. MockSSH v2.0+ supports
ssh-ed25519andecdsa. Avoid trying to forcessh-rsaunless you have enabled it on the client side.
MockSSH uses twisted.cred for authentication.
-
Solution: Double-check the
usersdictionary passed torunServer. Ensure the password matches exactly (it is case-sensitive).
This error occurs if you try to call reactor.run() or startThreadedServer() after the reactor has already been stopped.
-
Solution: In test suites, manage the reactor at the session level (using a
pytestsession fixture). Start it once and stop it only after all tests complete. UsestopThreadedServer(server_port)to stop individual listeners instead of the reactor.
-
Solution: Ensure no other process (or a previous leaked test run) is listening on the target port. Use
pkill -f MockSSHorss -tulpn | grep <port>to find and stop lingering processes.