Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Auth fail using pub key to linux server

Help
2010-05-15
2013-05-28
  • Noah Seidman
    Noah Seidman
    2010-05-15

    I have tried everything including reformatting the key that KeyPair produces. I use the key produced and upload the public key to the server adding it to the authorized_keys2 file. Auth fail. I also tried importing a sever generated (ssh-keygen) private key; clearly the produced pub key was added to authorized_keys2. I cannot get pub key authentication to work with a linux server. Jsch is reading the key file; no file not found exceptions. The keys are fine as my application has a dialog that displays the keys text and it looks completely normal. Using the key generated by KeyPair I get an ssh error in /var/log/auth "bad decrypted len".

     
  • Noah Seidman
    Noah Seidman
    2010-05-15

    I think not setting kpair.vendor to VENDOR_OPENSSH results in the default key being VENDOR_FSECURE. I'm at work, I'll try this later tonight. I was just sifting through the class a bit.

     
  • Noah Seidman
    Noah Seidman
    2010-05-15

    Nope, the default is VENDOR_OPENSSH. Its right at the top. The problem with the "bad decrypt len", I think, is that when I modified the jsch KeyGen I'm generating a file that is larger than the key itself, this generated extra length that is causing the auth to fail.