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

Support JSCH #326

Closed
Joeviocoe opened this issue Nov 21, 2023 · 8 comments
Closed

Support JSCH #326

Joeviocoe opened this issue Nov 21, 2023 · 8 comments
Milestone

Comments

@Joeviocoe
Copy link

ssh-rsa is no longer being supported by many clients. Please support JSCH algorithms.

@wolpi
Copy link
Owner

wolpi commented Nov 26, 2023

This app supports newer algorithms like ecdsa and ed25519. And there is #317. Which algorithm do you miss?

@Joeviocoe
Copy link
Author

Not sure exactly what happened or what algorithms would work. But the issue was with the SFTP update to Keepass2Android. v1.09 broke the ability to connect to primative-ftpd. In the latest pre-release beta version (1.10-pre), I now have the option to specify a deprecated algorithm. So it works again if I specify ssh-rsa.
PhilippC/keepass2android#2386

@wolpi
Copy link
Owner

wolpi commented Nov 27, 2023

can you share screenshots or logs in which we can see more detail? In server log we should see which algorithms are tried when connection fails, that would be interesting.

@Joeviocoe
Copy link
Author

Screenshot_Keepass2Android

grep -i algo prim-ftpd-log-2023-11-29-13-07-19.csv

"2023-11-29 01:09:07.6";"TRACE";"org.apache.sshd.server.session.ServerSession";"Kex: negotiate(kex algorithms) guess=ecdh-sha2-nistp256 (client: ecdh-sha2-nistp256,ecdh-sha2-nis...";"";
"2023-11-29 01:09:07.6";"TRACE";"org.apache.sshd.server.session.ServerSession";"Kex: negotiate(server host key algorithms) guess=ssh-rsa (client: ssh-rsa / server: ssh-ed25519,s...";"";
"2023-11-29 01:09:07.6";"TRACE";"org.apache.sshd.server.session.ServerSession";"Kex: negotiate(encryption algorithms (client to server)) guess=aes128-ctr (client: aes128-ctr,aes...";"";
"2023-11-29 01:09:07.6";"TRACE";"org.apache.sshd.server.session.ServerSession";"Kex: negotiate(encryption algorithms (server to client)) guess=aes128-ctr (client: aes128-ctr,aes...";"";
"2023-11-29 01:09:07.6";"TRACE";"org.apache.sshd.server.session.ServerSession";"Kex: negotiate(mac algorithms (client to server)) guess=hmac-sha2-256 (client: hmac-sha2-256-etm@...";"";
"2023-11-29 01:09:07.6";"TRACE";"org.apache.sshd.server.session.ServerSession";"Kex: negotiate(mac algorithms (server to client)) guess=hmac-sha2-256 (client: hmac-sha2-256-etm@...";"";
"2023-11-29 01:09:07.6";"TRACE";"org.apache.sshd.server.session.ServerSession";"Kex: negotiate(compression algorithms (client to server)) guess=none (client: none / server: none";"";
"2023-11-29 01:09:07.6";"TRACE";"org.apache.sshd.server.session.ServerSession";"Kex: negotiate(compression algorithms (server to client)) guess=none (client: none / server: none";"";
"2023-11-29 01:09:53.8";"TRACE";"org.apache.sshd.server.session.ServerSession";"Kex: negotiate(kex algorithms) guess=ecdh-sha2-nistp256 (client: ecdh-sha2-nistp256,ecdh-sha2-nis...";"";
"2023-11-29 01:09:53.8";"WARN";"org.apache.sshd.server.session.ServerSession";"Exception caught";"java.lang.IllegalStateException: Unable to negotiate key exchange for server host key algorithms (client: rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521 / server: ssh-ed25519,ssh-rsa,ssh-rsa)

@wolpi
Copy link
Owner

wolpi commented Dec 3, 2023

That sounds to me like client and server would partly use/support same algorithms but use different names for them. This app supports names as used by OpenSSH.

Also seems like JSCH does not support ed25519, which some consider the "best" algorithm.
JSCH seems to support ecdsa which this app supports for encryption but not as host-key. That would be something to consider if I find time for that.

Which client application do you use?

@Joeviocoe
Copy link
Author

Which client application do you use?

https://github.com/PhilippC/keepass2android/

@wolpi
Copy link
Owner

wolpi commented Dec 9, 2023

Good to know.

You might also ask in JSCH project to add support for algorithm ed25519. Maybe they are faster than me 😄

wolpi added a commit that referenced this issue Jun 2, 2024
…e and using it to have better names, fixed issue with choosing preferred HostKeyAlgo when fingerprints have not been generated, yet. See GH issue #326
@wolpi wolpi added this to the 7.2 milestone Jun 2, 2024
@wolpi
Copy link
Owner

wolpi commented Jun 2, 2024

Has been added.
You have to choose ECDSA 256 in preferences (host key algorithm). That preference has been newly added.

@wolpi wolpi closed this as completed Jun 2, 2024
lmagyar pushed a commit to lmagyar/prim-ftpd that referenced this issue Jun 8, 2024
…e and using it to have better names, fixed issue with choosing preferred HostKeyAlgo when fingerprints have not been generated, yet. See GH issue wolpi#326
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