net.schmizz.sshj.userauth.UserAuthException

Exhausted available authentication methods

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web11

  • via Unknown by Unknown author,
  • via Stack Overflow by vargen_
    ,
  • Stack trace

    • net.schmizz.sshj.userauth.UserAuthException: Exhausted available authentication methods at net.schmizz.sshj.SSHClient.auth(SSHClient.java:232) at net.schmizz.sshj.SSHClient.authPublickey(SSHClient.java:331) at net.schmizz.sshj.SSHClient.authPublickey(SSHClient.java:350) at com.foo.bar.baz.Client2.main(Client2.java:53) Caused by: net.schmizz.sshj.userauth.UserAuthException: Problem getting private key from PKCS8KeyFile{resource=[PrivateKeyFileResource] /Users/foo/.ssh/bar_id_rsa} at net.schmizz.sshj.userauth.method.KeyedAuthMethod.putSig(KeyedAuthMethod.java:61) at net.schmizz.sshj.userauth.method.AuthPublickey.sendSignedReq(AuthPublickey.java:74) at net.schmizz.sshj.userauth.method.AuthPublickey.handle(AuthPublickey.java:45) at net.schmizz.sshj.userauth.UserAuthImpl.handle(UserAuthImpl.java:136) at net.schmizz.sshj.transport.TransportImpl.handle(TransportImpl.java:490) at net.schmizz.sshj.transport.Decoder.decode(Decoder.java:107) at net.schmizz.sshj.transport.Decoder.received(Decoder.java:175) at net.schmizz.sshj.transport.Reader.run(Reader.java:60) Caused by: org.bouncycastle.openssl.EncryptionException: exception using cipher - please check password and data. at org.bouncycastle.openssl.jcajce.PEMUtilities.crypt(Unknown Source) at org.bouncycastle.openssl.jcajce.JcePEMDecryptorProviderBuilder$1$1.decrypt(Unknown Source) at org.bouncycastle.openssl.PEMEncryptedKeyPair.decryptKeyPair(Unknown Source) at net.schmizz.sshj.userauth.keyprovider.PKCS8KeyFile.readKeyPair(PKCS8KeyFile.java:143) at net.schmizz.sshj.userauth.keyprovider.PKCS8KeyFile.getPrivate(PKCS8KeyFile.java:72) at net.schmizz.sshj.userauth.method.KeyedAuthMethod.putSig(KeyedAuthMethod.java:59) ... 7 more Caused by: javax.crypto.BadPaddingException: pad block corrupted at org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher$BufferedGenericBlockCipher.doFinal(Unknown Source) at org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher.engineDoFinal(Unknown Source) at javax.crypto.Cipher.doFinal(Cipher.java:2165) ... 13 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,