Folder Sync and ssh keys

2,228 views
Skip to first unread message

bjornar

unread,
Jul 19, 2012, 4:19:58 PM7/19/12
to tacitd...@googlegroups.com
Hi! I'm quite new to android phones, but I must say that after some iphone years I'm fascinated by a phone that can be handled the linux way. But obviously I need some help: I've managed to set up Folder Sync at home, using a Samba share. It just works. But I would also like to add sftp support. I've created a keypar using ConnectBot. The keypar works at that application, but fails in Folder Sync. Error repeated on two different Android devices. So i guess the error is mine. I've included the log, and I hope someone has a clue for me! :-)
 
--bjørnarM
 
INFO/dk.tacit.android 0 19. juli 2012 21:54:23 Started collecting logs.
FINER/dk.tacit.android 1 19. juli 2012 21:54:23 AboutView: DeviceInfo: HTC One X running 4.0.3, FolderSync lite 2.1.8
FINER/dk.tacit.android 2 19. juli 2012 21:55:22 BatteryListener: Charging state change detected. State = Not charging
FINER/dk.tacit.android 3 19. juli 2012 21:56:09 EdtFtpProvider2: Creating new connection client...
SEVERE/dk.tacit.android 4 19. juli 2012 21:56:09 FolderSync.ProviderLogin: Error in login async task: Can't read key due to internal IO problems:
com.enterprisedt.net.j2ssh.transport.publickey.InvalidSshKeyException: Can't read key due to internal IO problems:
at com.enterprisedt.net.j2ssh.openssh.OpenSSHPrivateKeyFormat.decryptKeyblob(SourceFile:131)
at com.enterprisedt.net.j2ssh.transport.publickey.SshPrivateKeyFile.toPrivateKey(SourceFile:245)
at com.enterprisedt.net.ftp.ssh.SCPClient.setAuthentication(SourceFile:622)
at com.enterprisedt.net.ftp.ssh.SCPClient.setAuthentication(SourceFile:576)
at wq.a(SourceFile:85)
at wq.a(SourceFile:378)
at wq.a(SourceFile:502)
at ui.a(SourceFile:29)
at ui.doInBackground(SourceFile:12)
at android.os.AsyncTask$2.call(AsyncTask.java:264)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
at java.util.concurrent.FutureTask.run(FutureTask.java:137)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
at java.lang.Thread.run(Thread.java:864)
Caused by: com.enterprisedt.net.j2ssh.transport.publickey.InvalidSshKeyException: Unsupported type: PRIVATE KEY
at com.enterprisedt.net.j2ssh.openssh.OpenSSHPrivateKeyFormat.decryptKeyblob(SourceFile:122)
... 15 more

FINER/dk.tacit.android 5 19. juli 2012 21:56:17 AccountFragment: Account Info Saved
FINER/dk.tacit.android 6 19. juli 2012 21:56:17 AccountFragment: Name = 3
FINER/dk.tacit.android 7 19. juli 2012 21:56:22 BatteryListener: Charging state change detected. State = Not charging
INFO/dk.tacit.android 8 19. juli 2012 21:56:25 Started collecting logs.
FINER/dk.tacit.android 9 19. juli 2012 21:56:25 AboutView: DeviceInfo: HTC One X running 4.0.3, FolderSync lite 2.1.8
INFO/dk.tacit.android 10 19. juli 2012 21:56:29 AboutView: Reviewing file:///mnt/sdcard/Foldersync/logs/logs.txt
INFO/dk.tacit.android 11 19. juli 2012 21:56:29 Started collecting logs.
FINER/dk.tacit.android 12 19. juli 2012 21:56:29 AboutView: DeviceInfo: HTC One X running 4.0.3, FolderSync lite 2.1.8

Message has been deleted

Anders

unread,
Jul 23, 2012, 4:35:56 PM7/23/12
to tacitd...@googlegroups.com
Info on supported keys can be found here:


However I am not sure the issue is with the key in your case.

León Castillejos Fernández

unread,
Jul 26, 2012, 3:41:23 PM7/26/12
to tacitd...@googlegroups.com
I'm having the same problem. I would suggest to focus on why that message is happening (" Error in login async task: Can't read key due to internal IO problems").

Exactly same diagnostic, same issue. Keys created with Connectbot work in programs such as ftpcafe with no issues, but your app throws a very fuzzy error such as "Can't read key due to internal IO problems".

I paid for this app just for the only feature which was SFTP syncing support with SSH keys, as no other app has this functionality, but I'm not getting what I paid for :(

I also sent you a log file just in case you need it, but it's approximately the same as this one has posted here...

Is this a bug in your app? Because other apps seem to be able to use perfectly all the Connectbot created key pairs, yours doesn't work. Am I missing something? Please fix this ASAP, thank you :)
Message has been deleted

malte

unread,
Jul 31, 2012, 6:10:47 PM7/31/12
to tacitd...@googlegroups.com
Hi,

I got here after also getting this error.  For me the "internal IO problems" boiled down to a wrong pass phrase for the key.  Works fine with the right one now.  Maybe that's the problem in your case, too?
@TacitDynamics: maybe the error message could use some tuneup :)

Am Dienstag, 31. Juli 2012 13:50:46 UTC+2 schrieb maikr:
I get the error too.

"Can't read key due to internal IO problems:"

León Castillejos Fernández

unread,
Jul 31, 2012, 7:22:31 PM7/31/12
to tacitd...@googlegroups.com

My key has no passphrase and still fails.

Maik Rungberg

unread,
Aug 1, 2012, 2:48:10 AM8/1/12
to tacitd...@googlegroups.com

I have no pass for the key

Support User

unread,
Sep 1, 2012, 8:05:12 AM9/1/12
to tacitd...@googlegroups.com
Perhaps someone could generate a dummy key, that recreates this problem, and send it to me.

Best regards
Anders Carlsen
Software Developer

If you like our apps, please give them a 5-star rating. Thanks. :-)
 
Tacit Dynamics

Romec

unread,
Sep 1, 2012, 8:30:04 AM9/1/12
to tacitd...@googlegroups.com
Hi Anders, firstly I love this application, and appreciate the work your company does. Unfortunately I am not at a machine where I can generate keys, but perhaps I could ask one question that may help narrow down the issue(which I am also having). Does Foldersync, recognize specific types of PKCS like PKCS #8 or #1 ? I just remember for a rival software, I had to convert the RSA key generated by connect bot into a PKCS 8 format, in order for it to work(at least from my experience)

Support User

unread,
Sep 1, 2012, 8:42:35 AM9/1/12
to tacitd...@googlegroups.com
FolderSync uses an external library for SFTP access. How it handles the key files I don't know. It is this one:  http://www.enterprisedt.com/products/edtftpjssl/overview.html

Romec

unread,
Sep 1, 2012, 10:27:24 AM9/1/12
to tacitd...@googlegroups.com
Thank you very much for your help Anders. After fiddling around a bit more unsuccessfully, I decided to just make a new key pair using the Cygwin console, set up a new password, appended my authorized_keys file to include the new public key, and put the new private key on my phone/client device, and everything is working well now.

Muhammad Butt

unread,
Nov 24, 2012, 2:34:04 PM11/24/12
to tacitd...@googlegroups.com
Hi,

Did anyone find a solution for syncing directories via ssh keys. I am trying to login to linux server via my tablet and using ssh keys. I generated a pair via "ssh-keygen -t dsa". If I leave the password blank it works fine. However when I choose password, I start getting IO errors. Please help. This is no doubt an incredible app

thanks,

Support User

unread,
Nov 25, 2012, 9:27:41 AM11/25/12
to tacitd...@googlegroups.com
Are you talking about key or login password - there is a difference, and there are different fields to enter them into.

Muhammad Butt

unread,
Dec 1, 2012, 12:39:48 PM12/1/12
to tacitd...@googlegroups.com
THank you for replying my question. I am talking about ssh key. I have configured ssh server on a FreeBSD server and using foldersync to sync stuff to/from my android. 

You know when you create a keypair you have option to add password as an additional security. So if I add the password it stop working. However if i leave it blank it works fine.

The security issue is that if someone get hold of my private key they can log into ssh server.

let me know if you need more information

thanks again.
Muhammad

Support User

unread,
Dec 3, 2012, 5:44:04 PM12/3/12
to tacitd...@googlegroups.com
Info can be found here about the keyfiles supported by foldersync: http://www.enterprisedt.com/products/edtftpjssl/doc/manual/index.html
Reply all
Reply to author
Forward
Message has been deleted
0 new messages