On Android, you will likely want to login into your ssh shell (using screen irssi and so on). The original ConnectBot is nice, but does not allow you to use public ssh keys. So I am using VX ConnectBot for that task, being sort of a fork of the original iirc. Plus Hacker’s Keyboard, getting a feature rich keyboard replacement with cursor keys and so on (within its settings, make sure to select the keyboard mode portrait with “full-5-row input” in order to make this work with VX Connectbot).
Within VX Connectbot’s settings choose “Manage Pub Keys”, choose settings again with “Generate”, give it a name, add a passphrase (leave it blank, if you do not want to be asked everytime, insecure but well). Important – select to load the key at startup!
The newly generated key will be listed – now hold down your finger on it to open the options – choose “Export Public Key” and save it to the default (/storage/sdcard0/dnsmichi.pub).
In order to export your public ssh key to the host, this gets a bit tricky – if you do not want to fiddle with copy paste here. Workaround – send yourself an email with an attachment using Astro File Manager as selection source (make sure to have it installed).
Once received the file on your workstation, copy the new pubkey to your user.
# ssh-copy-id -i dnsmichi.pub firstname.lastname@example.org
Back on the Android – remember that you have chosen to load your key on startup – just connect again to your ssh host. Voila!