
Therefore, my first connection attempt will require a password. However, my authorized_keys file is stored in my home directory.
#Ssh copy key file password
Still, I kept getting prompted for a password upon login from my laptop.Īfter a few minutes on StackOverflow, I learned about Encrypted Home Directories, which are default in some environments, including Ubuntu.Įncrypted home directories aren’t decrypted until the initial login is successful.

ssh/ubuntu I expected, the utility asked for my VPS password in order to complete the public key transfer.

I then used the ssh-copy-id utility to copy my public key over to the authorized_keys file on my Vultr VPS: ssh-copy-id -i.I generated a new SSH keypair (named “ubuntu”) on my Mac using the command: ssh-keygen -t rsa -b 4096.

To set up key-based authentication from my laptop to the server, I’m partial to CentOS myself, but the task I was working on recommended Ubuntu. I recently provisioned a Ubuntu virtual private server (VPS) on Vultr. By Arit Amana What to do when key-based authentication isn’t working after ssh-copy-id
