Many people are aware that they can SSH into their iPod or iPhone from their computers. The fact that the iPhone can be an SSH client is often overlooked, though. It can even authenticate with RSA keys. In this guide I will demonstrate how to set up an iPhone or iPod to SSH into a computer with an RSA key.
This guide assumes that your device is jailbroken, and the OpenSSH package is installed. OK, so let's get down to business. The first step is to SSH into your device using:
After that, you will be in mobile's home directory. You can then generate the local RSA key using:
You will need to just press enter at all prompts. You should now have a file called id_rsa.pub in the hidden .ssh directory. The next step is to copy the id_rsa.pub file onto the computer you want to be able to SSH into. The method does not matter here, and it may or may not be a two step process. The home folder of the user you want is the easiest place to put id_rsa.pub. Here is an easy way to copy it from your device to the destination via SCP:
At this point you can exit out of your device SSH session. Once id_rsa.pub is in the home directory that you want on the server, somehow log in as that user and run:
This will copy the public key into the list of keys that the SSH server will accept. After this step you can delete the id_rsa.pub file from your home folder. And that is the last step! If everything worked correctly you should be able to open up Terminal on your jailbroken iPod/iPhone and SSH into the computer you set this up on!
If you have any questions/comments, feel free to post in the comment sections. I'll do my best to answer.
This guide assumes that your device is jailbroken, and the OpenSSH package is installed. OK, so let's get down to business. The first step is to SSH into your device using:
ssh mobile@[YOUR_IPODS_LAN_IP]
ssh-keygen -t rsa
scp .ssh/id_rsa.pub username@hostname.com:~
cat id_rsa.pub >> .ssh/authorized_keys
ssh username@hostname.com