Auth fail for methods 'publickey'
When I use an earlier version of the server or the server uses an earlier version of the encryption algorithm, an authentication failure message is displayed, as shown in the following figure
Hi @mujianping,
I'm not sure I understand? Are you stating that you are encountering this issue with the current JSch release (0.2.11)?
Thanks, Jeremy
Hi @mujianping,
I'm not sure I understand? Are you stating that you are encountering this issue with the current JSch release (0.2.11)?
Thanks, Jeremy
Hi @norrisjeremy , It is version 0.2.9. The server does not support ssh-rsa2-512 and ssh-rsa2-256, but the encryption algorithm negotiated during authentication is them, so the authentication fails. You need to manually specify PubkeyAcceptedAlgorithms for What does not automatically identify the intersection of the server-supported key and the local key file, and then generate an algorithm that meets the server requirements. Like this blog post https://unix.stackexchange.com/questions/721606/ssh-server-gives-userauth-pubkey-key-type-ssh-rsa-not-in-pubkeyacceptedalgorit Thanks, Mujianping
Hi @mujianping,
Yes, it may be necessary to manually specify PubkeyAcceptedAlgorithms if the server to which you are connecting does not support the algorithms from the default PubkeyAcceptedAlgorithms value. I'm not sure why you believe this is an issue?
Thanks, Jeremy