Hello everyone, it’s my first time working with Digital Ocean. I’ve already created my droplet with ubuntu 16, created my SSH keys on Mac and included in the droplet. But I can’t login using SSH without including the private key path:
ssh root@DROPLET_IP -i /path/to/private_key
If the path to private key is included I can log in, otherwise the public key is denied.
Can anyone help me?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Where is your private key located? By default, ssh looks for a key in ~/.ssh/id_rsa. It sounds like your key is stored somewhere else, so that’s why you’re unable to connect without explicitly specifying the path to your key.
You can either move/copy your SSH key to that path, use ssh-agent, or modify the config file ~/.ssh/config to include the existing path:
Host *
IdentityFile /path/to/private_key
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.