Adding public key to an existing droplet failed
I created a droplet and selected the "ssh key" option, without actually generating the key pair. After the droplet was created, I think I need to add a public key I locally generated on my Linux machine to the droplet, but I can't make it work. I generate the key pair locally, and executed:
ssh-copy-id -i .ssh/idjenkinsrsa.pub root@my_ip_address.
Now I check on the authorized_keys on the droplet, and found there are two keys, one being the added one.
But when I tried to ssh the the server, I am still asked to enter a password. How can I make it work? Can I remove the .ssh/authorized_keys on the droplet and copy my local public key file to the remote droplet?
It has been very annoying. My machine is CentOS 7. Thanks.