I'm using a rooted custom Android kernel (Gingerbread), and am able to connect to a remote SSH server with password authentication using busybox and a terminal emulator app. I would like to be able to use SSH keys for auto-login; is this possible? If so, where should I put my private key?
It's not quite as seamless, but the
ssh binary provided by busybox (mine, at least) supports the
-i flag, so you can put the key wherever you want and use that:
ssh -i /path/to/key_file email@example.com
The relevant man page entry for
-i (with the caveat that the information about the default path may not be the same on Android):
-i identity_file Selects a file from which the identity (private key) for public key authentication is read. The default is ~/.ssh/identity for protocol version 1, and ~/.ssh/id_dsa, ~/.ssh/id_ecdsa and ~/.ssh/id_rsa for protocol version 2. Identity files may also be specified on a per-host basis in the configuration file. It is possible to have multiple -i options (and multiple identities specified in configuration files). ssh will also try to load certificate information from the filename obtained by appending -cert.pub to identity filenames.
Install & run ConnectBot (a dedicated SSH client). Tap/press menu key. From the menu, tap
Manage Pubkeys. On next screen, again press/tap menu key. From the menu, tap