I am trying to set up private key validation on my server. I think this is a simple question, I just don't want to get locked out of the server by mistake. I generated an ssh key with ssh-keygen, it just looks different from the tutorial I am watching on deployment. It is just a long list of characters as such :


However, the video I am watching on deployment shows an ssh key like such:

ssh-rsa b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAA..etc USER@desktop2FBF

I am not sure if they look different because I am on a mac and the guide is using windows. But my key does not begin with ssh-rsa or end with USER@... Also, I see there are two files created with this command, the .pub one I cannot open, so I assume I am copying and pasting the key from the right file(the only one I can open).

Thanks for any help.


The key that begins with ssh-rsa is the public key.

The first one in the question is your private key.

The public key is the one that should be transferred to the server. It will end up in the authorized_keys file.

  • I am assuming that is the .pub file. However, when I click this file it says I do not have an application that can open it? Shoud I just open it via the command line with nano? – Justin Feb 20 at 16:27
  • It is a text file. You can open it with any text editor. – Organic Marble Feb 20 at 16:27
  • Sorry, just had to click 'choose application'. Don't know why it didn't open in a default text-editor window, but anyway, thanks! Almost tried to use the wrong key... – Justin Feb 20 at 16:29
  • 1
    Ill accept answer when I can – Justin Feb 20 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.