Heroku Create: No ssh public key found in ~/.ssh/id_[rd]sa.pub

by Mike DePalma on February 3, 2010 · 10 comments

in Development

For those who are trying out Heroku for the first time, and have not set up their Mac for keypair authentication, here is what you need to do in order to generate ssh public keys.

If you keep seeing this:

$ heroku create
Enter your Heroku credentials.
Email:
Password:
No ssh public key found in /Users/mike/.ssh/id_[rd]sa.pub.  You may want to specify the full path to the keyfile.

1. Generate RSA key:

$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/mike/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Your identification has been saved in /Users/mike/.ssh/id_rsa.
Your public key has been saved in /Users/mike/.ssh/id_rsa.pub.
The key fingerprint is:
The key's randomart image is:

2. Generate DSA key:

$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/Users/mike/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Your identification has been saved in /Users/mike/.ssh/id_dsa.
Your public key has been saved in /Users/mike/.ssh/id_dsa.pub.
The key fingerprint is:
The key's randomart image is:

3. Create your Heroku app:

$ heroku create
Enter your Heroku credentials.
Email:
Password:
Uploading ssh public key /Users/mike/.ssh/id_rsa.pub
Created http://myapp.heroku.com/ | git@heroku.com:myapp.git
Git remote heroku added

Viola! This applies for any situation requiring ssh keys – sftp access, capistrano deployment, etc.

{ 10 comments… read them below or add one }

Don June 10, 2010 at 9:49 pm

worked great, thx for taking the time.

Reply

Jose B June 5, 2010 at 7:35 pm

Thanks a lot!!!!
(Windows 7, not Mac, though…)

Reply

laz May 19, 2010 at 11:39 pm

Hi, I am trying to install this plugin in my windows machine. I am not sure on which command prompt, I should be generating these rsa and dsa keys.. Currently, I get an error that ssh is not recognized as internal or external command. operable program or batch file. Please suggest.

Reply

Mike DePalma May 21, 2010 at 1:37 pm

Hey Laz, it’s been a while since I had to do this on a Windows box. I always used Putty as my preferred shell client – try the directions here: http://www.panix.com/help/sw.ssh-win.html#5. Good luck!

Reply

Francisco Sáez May 11, 2010 at 5:39 am

Thank you so much, Mike. Your post helped me to fix the issue.

Reply

Maxi April 26, 2010 at 3:45 pm

Thanks Mike !
Very helpful.

Reply

Michael April 14, 2010 at 5:00 am

thx a lot!

Reply

Charles April 12, 2010 at 5:01 am

Thanks it heps me a lot.

Reply

Derek April 6, 2010 at 5:55 am

thanks dude!

Reply

Victor March 28, 2010 at 6:27 pm

Sweet! Thanks.

Reply

Leave a Comment