Skip to content
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

Updating ed25519-dalek breaks agent server #198

Closed
gotlougit opened this issue Oct 31, 2023 · 2 comments
Closed

Updating ed25519-dalek breaks agent server #198

gotlougit opened this issue Oct 31, 2023 · 2 comments

Comments

@gotlougit
Copy link
Contributor

Hello, I've been using russh as the SSH implementation for sshield, which aims to be a more secure SSH agent server.

I was updating my dependencies and noticed that an upgrade for russh broke the agent. I bisected russh and found commit 43edc32 was the culprit. Scanning the agent server code, I don't really see anything that would break the agent.

Running ssh -T <sample-server> with the updated russh gives me this output:

debug1: Found key in /home/gotlou/.ssh/known_hosts:2
debug1: rekey out after <redacted> blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after <redacted> blocks
debug1: get_agent_identities: ssh_fetch_identitylist: incomplete message

Whereas it should be:

debug1: Found key in /home/gotlou/.ssh/known_hosts:2
debug1: rekey out after <redacted> blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after <redacted> blocks
debug1: get_agent_identities: agent returned <redacted> keys

I think there is some issue with the way the russh agent sends the public keys to the ssh client, perhaps there was a conversion or two that was overlooked while upgrading to ed25519-dalek 2.0?

@Eugeny Eugeny closed this as completed in c66f4b0 Nov 15, 2023
@Eugeny
Copy link
Member

Eugeny commented Nov 15, 2023

I think I might have found it - let me know if the fix works for you!

@gotlougit
Copy link
Contributor Author

This fixed it, thank you very much!

gotlougit added a commit to gotlougit/sshield that referenced this issue Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants