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,670 points
466 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
1 answer

i have configure docker on AWS EC2 instance but commands are not working inside docker container.

Hello @Aniket , The docker exec command runs a new command ...READ MORE

answered Aug 5, 2020 in AWS by Niroj
• 82,880 points
1,427 views
+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,118 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
1,458 views
0 votes
1 answer

Using Shapely on AWS Lambda with Python 3

For some reason, the pip install of ...READ MORE

answered Oct 8, 2018 in AWS by Priyaj
• 58,090 points
2,596 views
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