leofarage / connectbot

Automatically exported from code.google.com/p/connectbot
Apache License 2.0
0 stars 0 forks source link

Can't keep private key unlocked #206

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I had to reinstall connectbot after a transition to Android 1.6.  I'm now 
finding it impossible to keep the private key I use for logins unlocked.  
I import the key from SD card as always, click to unlock to green from 
red, select "load key at start", and select that key for my connection.  
This work fine.  Until I boot.  After a boot (or if the connectbot service 
is killed for any other reason), the private key goes back to locked red 
and I have to go through the whole procedure again.  By the way, key is 
showing with an unknown bit size -- I don't recall if this was also the 
case under Android 1.5.

Any ideas appreciated.  Thanks.

Original issue reported on code.google.com by lauren4...@gmail.com on 19 Oct 2009 at 7:25

GoogleCodeExporter commented 8 years ago
I assume the key is not password protected?

Original comment by kenny@the-b.org on 19 Oct 2009 at 4:33

GoogleCodeExporter commented 8 years ago
Correct.

Original comment by lauren4...@gmail.com on 19 Oct 2009 at 4:35

GoogleCodeExporter commented 8 years ago
I'm also seeing "unknown bit size", for a 2048-bit RSA key, but I can't even 
unlock
it. About to log an issue on that...

Original comment by cdmac...@gmail.com on 10 Dec 2009 at 1:36

GoogleCodeExporter commented 8 years ago
This log seems related. This is on a Droid running 2.0.1. It also happened to 
me on
2.0. My key goes to red even after a short period of idle time and I always 
have to
unlock to connect.

12-14 11:30:01.577: INFO/ActivityManager(1023): Start proc org.connectbot for 
service
org.connectbot/.service.TerminalManager: pid=30474 uid=10048 gids={3003, 1015}
12-14 11:30:01.741: INFO/ConnectBot.TerminalManager(30474): Starting background 
service
12-14 11:30:01.741: INFO/com.nullwire.trace.ExceptionsHandler(30474): 
Registering
default exceptions handler
12-14 11:30:01.999: DEBUG/ConnectBot.TerminalManager(30474): Problem adding key
'id_rsa' to in-memory cache
12-14 11:30:01.999: DEBUG/ConnectBot.TerminalManager(30474):
java.security.NoSuchAlgorithmException: KeyFactory IMPORTED implementation not 
found
12-14 11:30:01.999: DEBUG/ConnectBot.TerminalManager(30474):     at
org.apache.harmony.security.fortress.Engine.getInstance(Engine.java:104)
12-14 11:30:01.999: DEBUG/ConnectBot.TerminalManager(30474):     at
java.security.KeyFactory.getInstance(KeyFactory.java:94)
12-14 11:30:01.999: DEBUG/ConnectBot.TerminalManager(30474):     at
org.connectbot.util.PubkeyUtils.decodePrivate(PubkeyUtils.java:160)
12-14 11:30:01.999: DEBUG/ConnectBot.TerminalManager(30474):     at
org.connectbot.service.TerminalManager.onCreate(TerminalManager.java:136)
12-14 11:30:01.999: DEBUG/ConnectBot.TerminalManager(30474):     at
android.app.ActivityThread.handleCreateService(ActivityThread.java:2765)
12-14 11:30:01.999: DEBUG/ConnectBot.TerminalManager(30474):     at
android.app.ActivityThread.access$3200(ActivityThread.java:119)
12-14 11:30:01.999: DEBUG/ConnectBot.TerminalManager(30474):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1902)
12-14 11:30:01.999: DEBUG/ConnectBot.TerminalManager(30474):     at
android.os.Handler.dispatchMessage(Handler.java:99)
12-14 11:30:01.999: DEBUG/ConnectBot.TerminalManager(30474):     at
android.os.Looper.loop(Looper.java:123)
12-14 11:30:01.999: DEBUG/ConnectBot.TerminalManager(30474):     at
android.app.ActivityThread.main(ActivityThread.java:4338)
12-14 11:30:01.999: DEBUG/ConnectBot.TerminalManager(30474):     at
java.lang.reflect.Method.invokeNative(Native Method)
12-14 11:30:01.999: DEBUG/ConnectBot.TerminalManager(30474):     at
java.lang.reflect.Method.invoke(Method.java:521)
12-14 11:30:01.999: DEBUG/ConnectBot.TerminalManager(30474):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
12-14 11:30:01.999: DEBUG/ConnectBot.TerminalManager(30474):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
12-14 11:30:01.999: DEBUG/ConnectBot.TerminalManager(30474):     at
dalvik.system.NativeStart.main(Native Method)
12-14 11:30:02.061: WARN/Service(30474): setForeground: ignoring old API call on
org.connectbot.service.TerminalManager

Original comment by skist...@gmail.com on 14 Dec 2009 at 7:48

GoogleCodeExporter commented 8 years ago
I also had this problem, but I found that if you select your session by a long 
press, then select "Edit Host", you can specify your preferred key under "Use 
pubkey authentication". This will allow you to connect to your server with the 
specified key even if its locked (red) in Manage Pubkeys. This is only a 
workaround however, and this bug should still be fixed in a future release.

Original comment by alf...@gmail.com on 14 Jul 2010 at 3:04

GoogleCodeExporter commented 8 years ago
The workaround in comment #5 doesn't seem to work for me. I don't get prompted 
to unlock the key, and of course it can't be used if it's not been unlocked.

Original comment by cdmac...@gmail.com on 14 Jul 2010 at 9:23

GoogleCodeExporter commented 8 years ago
My key is password protected, if that makes a difference

Original comment by cdmac...@gmail.com on 14 Jul 2010 at 9:24

GoogleCodeExporter commented 8 years ago
Fixed in SVN r509 by yath

Original comment by kenny@the-b.org on 23 Aug 2010 at 4:37

GoogleCodeExporter commented 8 years ago
Still an issue in the 2013-04-16 snapshot. Log:
 D/ConnectBot.TerminalManager(17859): Problem adding key 'Home.key' to in-memory cache
D/ConnectBot.TerminalManager(17859): java.security.NoSuchAlgorithmException: 
KeyFactory IMPORTED implementation not found
D/ConnectBot.TerminalManager(17859):    at 
org.apache.harmony.security.fortress.Engine.notFound(Engine.java:113)
D/ConnectBot.TerminalManager(17859):    at 
org.apache.harmony.security.fortress.Engine.getInstance(Engine.java:102)
D/ConnectBot.TerminalManager(17859):    at 
java.security.KeyFactory.getInstance(KeyFactory.java:83)
D/ConnectBot.TerminalManager(17859):    at 
org.connectbot.util.PubkeyUtils.decodePrivate(PubkeyUtils.java:149)
D/ConnectBot.TerminalManager(17859):    at 
org.connectbot.service.TerminalManager.onCreate(TerminalManager.java:140)
D/ConnectBot.TerminalManager(17859):    at 
android.app.ActivityThread.handleCreateService(ActivityThread.java:2066)
D/ConnectBot.TerminalManager(17859):    at 
android.app.ActivityThread.access$2500(ActivityThread.java:123)
D/ConnectBot.TerminalManager(17859):    at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:993)
D/ConnectBot.TerminalManager(17859):    at 
android.os.Handler.dispatchMessage(Handler.java:99)
D/ConnectBot.TerminalManager(17859):    at android.os.Looper.loop(Looper.java:130)
D/ConnectBot.TerminalManager(17859):    at 
android.app.ActivityThread.main(ActivityThread.java:3835)
D/ConnectBot.TerminalManager(17859):    at 
java.lang.reflect.Method.invokeNative(Native Method)
D/ConnectBot.TerminalManager(17859):    at 
java.lang.reflect.Method.invoke(Method.java:507)
D/ConnectBot.TerminalManager(17859):    at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
D/ConnectBot.TerminalManager(17859):    at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
D/ConnectBot.TerminalManager(17859):    at dalvik.system.NativeStart.main(Native 
Method)

Original comment by nathan.r...@gmail.com on 6 Jul 2013 at 7:31

GoogleCodeExporter commented 8 years ago
This problem is still happening for me with the current version of ConnectBot.

Original comment by captbu...@gmail.com on 2 Jan 2014 at 9:07

GoogleCodeExporter commented 8 years ago
This problem is also still happening for me with the current latest version of 
ConnectBot.

Original comment by JALH...@gmail.com on 22 Jun 2014 at 12:32

GoogleCodeExporter commented 8 years ago
In response to comment number #11, I do not see any problem. My key has a pass 
phrase and hence I have to unlock it before use.  I've configured my hosts as 
per comment #5 and if I haven't unlocked the keys prior to connecting to a 
host, I'm prompted for my pass phrase.

My only issue is that when I first used ConnectBot (quit a long while ago) and 
I unlocked the keys, they stayed unlocked until the phone was rebooted. 
Currently, the keys go back to being locked a short while after ConnectBot is 
closed with no active sessions. I guess this makes it more secure but bloody 
annoying!

Original comment by aka...@gmail.com on 7 Jul 2014 at 11:55