SCP not working in EC2 AWS

0 votes

I can SSH into the EC2 instance:

ssh -i "my_key.pem" ec2-user@my-public-ip

However, scp doesn't work:

scp -r –i "my_key.pem" ./my_file ec2-user@my-public-ip:/home/ec2-user/my_file

Permission denied (public key).

lost connection

I've also tried using public instance DNS, but nothing changes.

Any idea why is this happening and how to solve it?

Apr 25, 2022 in AWS by Rahul
• 9,690 points
840 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In AWS

0 votes
1 answer
+1 vote
10 answers
0 votes
3 answers

What is CPU Credit Balance in EC2 for AWS?

When you use fewer CPU resources then ...READ MORE

answered Nov 30, 2018 in AWS by Aniket
2,901 views
+3 votes
3 answers
0 votes
1 answer

if instance is a part of some AutoScaling Group in AWS or not ?

You can run this command below on ...READ MORE

answered Jun 2, 2018 in AWS by Cloud gunner
• 4,670 points
2,062 views
0 votes
1 answer

Do you get charged for a security group in AWS EC2?

There is no charge applicable to Security ...READ MORE

answered Jul 18, 2018 in AWS by Priyaj
• 58,020 points
13,781 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP