Can't figure out SSH keys

  • Posted on February 19, 2015
  • taeAsked by tae

For this tutorial:

I do not understand step 2: It says: Once you have entered the Gen Key command, you will get a few more questions: Enter file in which to save the key (/home/demo/.ssh/id_rsa):

So where is this “file”. I created a file path on my home computer under “my documents”, but nothing was created in that folder. Is the “file” the key is saved to on the Ubuntu server? This step needs clarification.

instead of “demo” I named my user after me: matthewtae

So I typed: (/home/matthewtae/.ssh/idrsa) I receive the message: No such file or directory. Saving the key failed: (/home/matthewtae/.ssh/idrsa).

Soooo… the tutorial needs to be clearer about that step, where to “save the key” to. Where am I actually saving the key to? To my local hard drive that is sitting on my desk? Or to some place on the server?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I followed the instructions in the link you posted, i.e. just hit “enter” when a file path is requested. However, the result is not the same. The tutorial say the file path should be: Your identification has been saved in /home/username/.ssh/id_rsa. Your public key has been saved in /home/username/.ssh/ The key fingerprint is: a9:49:2e:2a:5e:33:3e:a9:de:4e:77:11:58:b6:90:26 username@remote_host The key’s randomart image is: ±-[ RSA 2048]----+ | …o | | E o= . | | o. o | | … | | …S | | o o. | | =o.+. | |. =++… | |o=++. | ±----------------+

However, in my screenshot here, the “Your identification has been saved in…” is different:

Something is wrong here. Where is the SSH key? I can’t find it on my hard drive.

This comment has been deleted


You generate the key on your local computer. It will create two different files. A public key and a secret key. The public one is what you add in the DigitalOcean control panel.

When you are presented with the prompt:

Generating public/private rsa key pair.
Enter file in which to save the key (/Users/localuser/.ssh/id_rsa):

You can either type out the full path to a file where you’d like to save the key file or you can simply press enter and it use the default path, which is what is shown in parentheses.

Check out this tutorial for a more detailed look: