Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Adding additional SSH key to existing Droplet
I have a droplet with no-password ssh access. I would like to provide access to my colleague.
I had him generate a key-pair on his linux machine, and got his public key. Then, I added his key to the
~/.ssh/authorized_keys file along with my key, following the tutorial here: https://docs.digitalocean.com/products/droplets/how-to/add-ssh-keys/to-existing-droplet/#manually
I did set the permissions afterwards as instructed.
I’m still able to ssh in, but he cannot:
Error Permission denied (publickey)
service sshd restart, but to no effect.
Similarly, I tried to set myself up from a different machine, but again I’m getting the same permission denied error.
I read some other tutorials that suggested to set a password authentication, but that’s not what I want to do. Need ssh login.
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.×