By Sam1012
Hi I just set up ssh keys using openssh and added them to my droplet following the guides. The ssh keys have been saved in a non-default folder on my computer. During my first login via ssh I used the command
ssh -i /path/to/private/key username@203.0.113.0
I was asked to enter my passphrase and upon entering it given access. All good till here.
Now the second time I logged in, I enterered
ssh username@203.0.113.0
But this did not log me in directly.
So I had to use just like the first time
ssh -i /path/to/private/key username@203.0.113.0
and enter my passphrase.
Is this normal and happening because my SSH key is in a non-default folder? Or am I doing anything wrong?
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!
One way would be to add your public keys to your Digital Ocean account (in the Security tab https://cloud.digitalocean.com/account/security). Then when you create your droplet, you can reference these by the ID. API ref: https://developers.digitalocean.com/documentation/v2/#create-a-new-droplet.
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.