What password should I use for a newly created ssh public key?

March 16, 2016 1.8k views
Linux Commands Linux Basics Security Ubuntu

I have been trying to create an ssh key for my droplet. I have followed the Digital Ocean documentation on it and I can't seem to get it to work.

I run the following commands from the documentation however when it asks me for the password in the final step I don't know what to use as a password?

I have used my root password and it does not work.

7 comments
  • Do you mean "Enter passphrase (empty for no passphrase):" ?

  • @gp+digitalocean
    No its the end of this part:

    The authenticity of host '12.34.56.78 (12.34.56.78)' can't be established.
    RSA key fingerprint is b1:2d:33:67:ce:35:4d:5f:f3:a8:cd:c0:c4:48:86:12.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added '12.34.56.78' (RSA) to the list of known hosts.
    user@12.34.56.78's password:

  • It looks like you didn't properly authenticate with the key, so it's falling back to password authentification. You'll want to review authentification logs and verify the SSH key has been correctly added to authorized_keys, and that your client is sending it.

  • @gp+digitalocean
    The SSH key has not been added to the authorized_keys file, all I see is the root key. Also am I supposed to be running the commands to create an SSH key on my personal machine or the Digital Ocean server?

  • You create the key on your machine, then you add the public key to the user's authorized_keys file on the server so it can be authenticated.

  • Ok, I have created a key on my machine and copied that public key into the authorized_keys file in my droplet. I am curious how I can ssh into it using a custom name such as tyler@111.11.222.22? 111.11.222.22 being the ip address of my server and "tyler" being the custom name.

  • Linux is a multi-user OS that is based on the Unix concepts of file ownership and permissions to provide security, at the file system level. If you are planning improving your Linux skills, it is essential that have a decent understanding of how ownership and permissions...
1 Answer

This question was answered by @gparent:

It looks like you didn't properly authenticate with the key, so it's falling back to password authentification. You'll want to review authentification logs and verify the SSH key has been correctly added to authorized_keys, and that your client is sending it.

You can see the comment here.

Have another answer? Share your knowledge.