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.
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
P.S. Uninstalling & reinstalling ConnectBot and re-importing the key
doesn't seem to fix whatever is making unlocking fail. :(
chmod 400 keyfile.pem