apache mina SSH_MSG_USERAUTH_REQUEST send for different public key algo like rsa-sha rsa-sha-256 rsa-sha-515

134 views Asked by At

I am using apache mina client, version 2.9.2. I am trying to authenticate with password but the client automatically loads config file from ~/.ssh/config and try to first authenticate with public key then attempt password. This is working fine when i connect to ole7 servers but exhaust maxAuthRetries 6 when i connect to ole6 server.

on ole6 server it send auth request 6 times for one public key. for a same fingerprints it send 3 times with different public key types (rsa-sha, rsa-sha2-256, rsa-sha2-512) and then retry again 3 times and exhaust max retries

023-05-11 13:01:18 DEBUG UserAuthPublicKey:235 - sendAuthDataRequest(ClientSessionImpl[user@dummy/1.1.1.1])[ssh-connection] send SSH_MSG_USERAUTH_REQUEST request publickey type=rsa-sha2-512 - fingerprint=SHA256:qzxbNHbNM7WfQwgwdWwaUkG/IAiLhoAWe4NoG9nS6ag 2023-05-11 13:01:18 DEBUG UserAuthPublicKey:235 - sendAuthDataRequest(ClientSessionImpl[user@dummy/1.1.1.1])[ssh-connection] send SSH_MSG_USERAUTH_REQUEST request publickey type=rsa-sha2-256 - fingerprint=SHA256:qzxbNHbNM7WfQwgwdWwaUkG/IAiLhoAWe4NoG9nS6ag 2023-05-11 13:01:19 DEBUG UserAuthPublicKey:235 - sendAuthDataRequest(ClientSessionImpl[user@dummy/1.1.1.1])[ssh-connection] send SSH_MSG_USERAUTH_REQUEST request publickey type=ssh-rsa - fingerprint=SHA256:qzxbNHbNM7WfQwgwdWwaUkG/IAiLhoAWe4NoG9nS6ag 2023-05-11 13:01:19 DEBUG UserAuthPublicKey:235 - sendAuthDataRequest(ClientSessionImpl[user@dummy/1.1.1.1])[ssh-connection] send SSH_MSG_USERAUTH_REQUEST request publickey type=rsa-sha2-512 - fingerprint=SHA256:qzxbNHbNM7WfQwgwdWwaUkG/IAiLhoAWe4NoG9nS6ag 2023-05-11 13:01:19 DEBUG UserAuthPublicKey:235 - sendAuthDataRequest(ClientSessionImpl[user@dummy/1.1.1.1])[ssh-connection] send SSH_MSG_USERAUTH_REQUEST request publickey type=rsa-sha2-256 - fingerprint=SHA256:qzxbNHbNM7WfQwgwdWwaUkG/IAiLhoAWe4NoG9nS6ag 2023-05-11 13:01:19 DEBUG UserAuthPublicKey:235 - sendAuthDataRequest(ClientSessionImpl[user@dummy/1.1.1.1])[ssh-connection] send SSH_MSG_USERAUTH_REQUEST request publickey type=ssh-rsa - fingerprint=SHA256:qzxbNHbNM7WfQwgwdWwaUkG/IAiLhoAWe4NoG9nS6ag You have new mail in /var/spool/mail/mudsethi

on ole7, it try only for publickey type=rsa-sha2-512, retry one more time and authenticated with password 3rd time

cat /tmp/z | grep sendAuthDataRequest 2023-05-15 14:53:01 DEBUG UserAuthPublicKey:235 - sendAuthDataRequest(ClientSessionImpl[user@dummy/1.1.1.1])[ssh-connection] send SSH_MSG_USERAUTH_REQUEST request publickey type=rsa-sha2-512 - fingerprint=SHA256:qzxbNHbNM7WfQwgwdWwaUkG/IAiLhoAWe4NoG9nS6ag 2023-05-15 14:53:01 DEBUG UserAuthPublicKey:141 - sendAuthDataRequest(ClientSessionImpl[user@dummy/1.1.1.1])[ssh-connection] server rejected publickey authentication with known signature algorithm rsa-sha2-512 2023-05-15 14:53:01 DEBUG UserAuthPublicKey:235 - sendAuthDataRequest(ClientSessionImpl[user@dummy/1.1.1.1])[ssh-connection] send SSH_MSG_USERAUTH_REQUEST request publickey type=rsa-sha2-512 - fingerprint=SHA256:qzxbNHbNM7WfQwgwdWwaUkG/IAiLhoAWe4NoG9nS6ag 2023-05-15 14:53:01 DEBUG UserAuthPublicKey:141 - sendAuthDataRequest(ClientSessionImpl[user@dummy/1.1.1.1])[ssh-connection] server rejected publickey authentication with known signature algorithm rsa-sha2-512

0

There are 0 answers