By spampirico
Hi everyone,
I developed a bash script which uses Terraform CLI to deploy a Debian 10 droplet. I noticed that to SSH into a server like that using my SSH private key, I have to type in the following commands, as in this thread https://www.digitalocean.com/community/questions/permission-denied-after-creating-droplet-using-ssh-keys
eval ssh-agent -s
ssh-add ~/.ssh/id_rsa
I tried creating the same Debian 10 droplet from Digitalocean GUI and in this case I did not have to type in the ssh-agent and ssh-add commands.
Why this difference?
Are there some flags or options to set to avoid using the previous ssh commands?
Thank you
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!
Are you access the Debian machine in the same terminal? Once you start the agent and load your key, it should be good for the life of that session to access any systems using that 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.