I have an interesting problem.
I'd like to use a private SSH key with my Android Terminal Emulator (jackpal.androidterm). I'd like to install the private key in a fairly-secure location and be able to access the key in a fairly straightforward way. I'd like to do this:
ssh theotherserver
With a ~/.ssh/config file looking like this:
Host theotherserver
User mycustomuser
And the private key being read from ~/.ssh/id_rsa.
The problem is that Dropbear by default looks in /data/.ssh (at least here on CyanogenMod 11) and this folder is meant to be owned by root. I've done a chown and chmod on the directory and its children to be able to use it with the "app user" which is u0_a100, and that works, but these permissions are wiped on reboot: so no go.
What I'd really like to do is to simply tell Dropbear via a configuration file that its home lives in /data/data/jackpal.androidterm/app_HOME/.ssh, as this directory will be 'for sure' owned by the "app user" and I won't run into any permissions issues. An added benefit is that other users won't be able to read this directory as it is private to the application. (dir permissions is drwxrwx--x) Is there a way to configure Dropbear with a configuration file to change the location of its default .ssh directory? It would be awesome if it just used $HOME, but it's obviously not.
If that is impossible, how can I compile OpenSSH client or Dropbear for Android in a way that would enable me to achieve my (seeming simple) goal?
/data/.sshto/data/data/jackpal.androidterm/app_HOME/.ssh. Should Workaround the permission- and locationproblem.