Re: Issue 239 in connectbot: can't unlock private key

188 views
Skip to first unread message

conne...@googlecode.com

unread,
Dec 11, 2010, 6:03:20 AM12/11/10
to connectbo...@googlegroups.com

Comment #13 on issue 239 by i...@esoco.net: can't unlock private key
http://code.google.com/p/connectbot/issues/detail?id=239

I have the same problem. But it hasn't to do with the device or Connectbot
version, because two weeks ago I could open the same key without problem.
Today I tried again and had the problem described here. The key file hasn't
changed since then.

conne...@googlecode.com

unread,
Jul 4, 2011, 2:05:49 AM7/4/11
to connectbo...@googlegroups.com

Comment #14 on issue 239 by bren...@zen.org: can't unlock private key
http://code.google.com/p/connectbot/issues/detail?id=239

The same just happened to me on a Motorola Xoom running Android 3.1. With
ConnectBot 1.7.1 (v1.7.1 2010.10.08), I was able to unlock my key under
Manage Pubkeys and then use it to ssh to a host with no trouble. I
rebooted my Xoom, and now it won't do it any more. I've made sure that the
key's secret passphrase is valid, that APG is able to encrypt/decrypt
properly with the exact same sequence I'm trying to use with ConnectBot.

I also tried selecting the specific key under Edit Host -> Use pubkey
authentication, but it didn't change the result.

Using Log Toaster, it shows

E/ConnectBot.PubkeyListActivity( 2620): Bad password for key 'xoom.txt'.
Authentication failed.
java.io.IOException: Decrypted PEM has wrong padding, did you specify the
correct password?
at com.trilead.ssh2.crypto.PEMDecoder.removePadding(PEMDecoder.java:110)
at com.trilead.ssh2.crypto.PEMDecoder.decryptPEM(PEMDecoder.java:287)
at com.trilead.ssh2.crypto.PEMDecoder.decode(PEMDecoder.java:320)
at
org.connectbot.PubkeyListActivity.handleAddKey(PubkeyListActivity.java:265)
at org.connectbot.PubkeyListActivity$4.onClick(PubkeyListActivity.java:251)
at
com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:166)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:132)
at android.app.ActivityThread.main(ActivityThread.java:4025)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
at dalvik.system.NativeStart.main(Native Method)

I tried deleting the key in ConnectBot, re-importing it, and seeing if
that'd make it unlock it, but no success.

Hope this helps.

B


conne...@googlecode.com

unread,
Jul 4, 2011, 2:38:57 AM7/4/11
to connectbo...@googlegroups.com

Comment #15 on issue 239 by bren...@zen.org: can't unlock private key
http://code.google.com/p/connectbot/issues/detail?id=239

P.S. Uninstalling & reinstalling ConnectBot and re-importing the key
doesn't seem to fix whatever is making unlocking fail. :(

conne...@googlecode.com

unread,
Aug 31, 2011, 10:56:34 AM8/31/11
to connectbo...@googlegroups.com

Comment #16 on issue 239 by xbj9...@gmail.com: can't unlock private key
http://code.google.com/p/connectbot/issues/detail?id=239

chmod 400 keyfile.pem

conne...@googlecode.com

unread,
May 9, 2012, 8:14:44 AM5/9/12
to connectbo...@googlegroups.com

Comment #17 on issue 239 by databo...@gmail.com: can't unlock private key
http://code.google.com/p/connectbot/issues/detail?id=239

I've solved the problem of the key length not detecting properly. Keys
produced using OpenSSH may use the below header:
-----BEGIN RSA PRIVATE KEY-----

ConnectBot recognizes keys that use this header:
-----BEGIN PRIVATE KEY-----

Removing the "RSA" bit makes the key recognize correctly. See my attached
picture; both NoPassOpenSSH and NoPassOpenSSH2 are the exact same key, but
the second has the correct header.

However, I still cannot connect with the key that recognizes correctly.
I've tested the key with other SSH clients on my computer and have had no
success. Any fixes for the failing pubkey authentication?

Attachments:
Screenshot_2012-05-09-06-07-18.png 35.7 KB

Reply all
Reply to author
Forward
0 new messages