flutter_server_box
flutter_server_box copied to clipboard
Cannot connect to NixOS host: SSHAuthAbortError(Connection closed before authentication: null)
Describe the bug
I have 4 devices configured in ServerBox. 3/4 work as expected. The 4th cannot connect and produces an error: 'SSHAuthAbortError(Connection closed before authentication: null). I see several closed issues with this error however it still occurs on v1.0.1130.
- The 3 working connections are all running some form of Debian. The broken device is running NixOS. Unclear if #671 is the same issue.
- I can connect to the NixOS device via Termux (on the serverbox phone) using the same ed25519 pair so I do not think it is a user-config error.
Device
- Device: Pixel 7 Pro
- OS: Graphene OS 2025021100 (Android 15)
- App Version: v1.0.1130
I am on version v1.0.1201 and running into the same problem. The commit https://github.com/stellessia/flutter_server_box/commit/47f837765b9ef060af0890b2c13708bbee1a7adb does fix some NixOS issue but is unlikely to fix the authentication problem.
The error message states that Connection closed before authentication and indeed, if I try to connect with a totally made up ssh key, I get the same error.
At least in my case it is a cipher mismatch. From the server logs (ip and port replaced):
Unable to negotiate with 9.9.9.9 port 1234: no matching MAC found. Their offer: hmac-sha1,hmac-sha2-256,hmac-sha2-512,hmac-md5 [preauth]
Thanks,I will try it later.
I ran into the same issue and tried a workaround extending the defaults in nix, which worked:
services.openssh.settings.Macs = [
"[email protected]"
"[email protected]"
"[email protected]"
# NOTE: added for compatibility
"hmac-sha2-512"
"hmac-sha2-256"
];