Using Panic Prompt with EC2
15Apr11
Update (May 1, 2012): According to commenter Ethan Cane, these steps are no longer necessary. You should be able to directly transfer your .pem file to Panic Prompt using iTunes File Sharing. The below info is for historical purposes only.
Yesterday, Panic introduced Prompt, an SSH client for iOS. It took a little trial and error to get it working with EC2 .pem files, but I eventually succeeded. Since a lot of the blog comments show other users struggling with the same thing, here’s what worked for me.
- Your .pem file is an RSA private key. You need to generate an RSA public key from it. On Mac OS X, I did this by typing “ssh-keygen -y > foo.pub” and entering foo.pem when prompted for the key file.
- Make a copy of your foo.pem file to get rid of the extension. Now you have “foo” as the private key and “foo.pub” as the public key.
- If Prompt is running on your iPhone, do a hard exit (show the iPhone app switcher UI, long-press the Prompt icon to show the delete adornment).
- Connect the iPhone to your computer
- In iTunes, use File Sharing to transfer first foo.pub, then foo.
Hopefully you should see the key showing up in Prompt now.
Filed under: Uncategorized | 12 Comments
Great instructions, thanks. In step 2 it says ‘and “foo.pem” as the public key’ – presumably this is meant to be foo.pub (so that you’ve got foo and foo.pub).
Wardy: yes exactly, thanks. Updated.
Thanks Joey, just wat I was waiting for! Works like charm.
Thanks so much for this! EC2 support was the one thing holding me back from getting Prompt.
Now I can use it the right way.
Hi there,
I have used the above instructions to upload both by ‘foo’ and ‘foo.pub’ (private and public – respectively) to Prompt vi iTunes but only ‘foo’ seems to have been absorbed by the application (Prompt). ‘foo.pub’ still appears in the file listing under iTunes.
Can you confirm that uploading both files is absolutely necessary? Surely jus the private key (foo.pem renamed to foo) is required to authenticate with EC2. I don’t see how the public key would come into play as part of the authentication process.
Many thanks for posting this tutorial however. Much appreciated.
Interesting… but i have the same probhlem than Ethan. Can you confirm that uploading both files is absolutely necessary?
You only need to upload your private key (either upload via iTunes file sharing or copy and paste to the clipboard from an email) and enter the contents into Prompt. Job done. You just need the contents of foo.pem to make this all work.
Thanks for the info, I’ll update the post.
Wow, I finally got published. I am officially a real author. When do we go into print baby?
But seriously, I followed along with the original set of instructions posted and could not for the life of me understand why it wasn’t working as outlined, figuring that all of these steps were required.
It then dawned of me to simply think of the iPhone/iPad as just another client device accessing the EC2 server. For my other Linux servers I already have my public key stored in authorized_keys in my home directory so the missing piece was my private key (in this case *.pem).
I would however highly recommend uploading this key file using the iTunes file sharing mechanism (iTunes -> Device (iPad, etc) -> Apps -> File Sharing) so that this way you can name the file accordingly and sensibly. It makes recognising it in a long long easier.
If you only copy and paste then it will appear in a drop down menu as “Imported clipboard 1″ or “Imported clipboard 2″ or words to that effect. Also mailing your private key around to copy and paste is not a good security practice.
Thanks for the opportunity to help out. That’s why I am here!