Permission Denied (publickey) when using SSH

I have Ubuntu 20.04 running in VirtualBox as my control node. I am using AWS EC2 instances (Ubuntu) for my remote servers.

Every time I try to ssh into one of my EC2 instances I get " Permission Denied (publickey) ". I generate the key with no issues, but get the error when I try to run

 sudo ssh-copy-id -i <key>.pub 

I'm really new to Linux and AWS altogether so I'm wondering if there's something misconfigured somewhere in my AWS instance.

5 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like