How do I get the public key for Panic's Prompt app to setup auto-login to my Mac?

I have disabled the option to login with a password over ssh as that would be a security risk.

I have tried copying both the public and private key from my Mac to Prompt's Documents in iTunes, however it failed to connect.

If there is no easy way to retrieve the public key in Prompt, can I log all ssh connections to my Mac and get the public key from that log?


For starters, just to clarify the terminology, when you create a key pair, the private key (typically named id_rsa) goes on the client (in this case the Prompt app), and the public key (typically id_rsa.pub) goes in the ~/.ssh/authorized_keys file on the server you're logging in to (in this case your Mac).

You should be able to just drag the private key into Prompt via the iTunes documents interface. If you're getting a connection error, try doing it with your device attached via USB, not Wi-Fi (I've found Wi-Fi syncing can be a bit flaky at times). If that still doesn't work, open up your private key in a text editor, copy the text and send it to yourself in an email (or any other means that gets the text to your device). You can then copy that text, and when you click the key button in Prompt, it should give you the option to Import Clipboard Key.

  • So I should add my own Mac's public key to my authorized_keys also on my Mac? – Tyilo Aug 20 '12 at 19:23
  • @Tyilo, if you want to log in to your Mac, yes you do. – Gerry Aug 20 '12 at 19:26
  • @Gerry Ah I understand now. – Tyilo Aug 20 '12 at 19:28
  • 2
    @Tylio -- Noooo! You don't want to use the Mac's own private key as Prompt's private key! That would be a security mis-step. Just generate a completely new key (on OS X or anywhere else) and use it nowhere else but on that iOS device's Prompt. This should work just the same as ssh keys regularly do, except here instead of it living in ~/.ssh/ on the iPad (which it can't unless you JB) it lives in Prompt somewhere (and you give it to prompt via iTunes). Then obviously add the corresponding pub key to the Mac's authorized_keys. – Steven Lu Jul 3 '14 at 11:07
  • "open up your private key in a text editor, copy the text and send it to yourself in an email" Please don't do that. Email is (generally) not a secure channel. – Édouard Aug 7 '15 at 8:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .