I want to use SFTP to transfer files from Android to a Linux box using Public Key authentication rather than a traditional user name and password. Ideally I would like to use ES File Explorer (as I use it for everything else).
Can anyone tell me how to generate a suitable public/private key pair to allow ES File Explorer to authenticate with the SFTP server?
- When I try to connect to an SFTP server using a Private Key, I can select a file containing the key, but when I click OK, I get the message "Error, cannot find the SFTP(mysite.com) server".
- I know that ES File Explorer is capable of using SFTP because it worked when I was using password authentication. Now that I have switched passwords off on the server, it reports "Login fails. This may be caused by: Auth fail", which is pretty much what I would expect.
- I know that the Android phone still has connectivity to the SSH server, because I can connect to it using Connectbot with Public Key authentication.
- I know that SFTP is still working over SSH, because I can connect to it and transfer files using BitKinex running on a PC.
- CLARIFICATION: I am not running a firewall on the Android phone.
- CLARIFICATION: When the phone fails to connect, the SFTP server logs
Received disconnect from my.ip.ad.dr: 3: com.jcraft.jsch.JSchException: Auth fail [preauth]
I have successfully authenticated with the server using 2048-bit keys generated by PuTTY KeyGen, both in PuTTY's .ppk format (in PuTTY itself) and exported to OpenSSH format (for BitKinex). These keys didn't work; neither did exporting them to SSH.com format. I've also got OpenSSH / OpenSSL available on the Linux box as an alternative for key generation. Connectbot manages its own keys, but doesn't seem to be able to export the private key (option greyed out).
I guess the problem could either be that I am using the wrong key file format, or that I've got the wrong options set on the key itself. I haven't been able to find any instructions in the ES File Explorer documentation or on Google.
It ought not to make a difference, but I am using a Huawei Ascend P2 with Android 4.1.2. It is not rooted (and I'm not going to). The linux box is a Raspberry Pi with OpenSSH 6.0p1 Debian-4+deb7u2.