By using AWS re:Post, you agree to the Terms of Use

scp command difference for Ubuntu EC2 in a VPC


I'm attempting to scp to an Ubuntu EC2 inside a VPC and getting timed out.

Established facts:

I can ssh into the VPC itself - the keypair works and the instance subnet is open to the internet.

The folder I'm attempting to transfer to on the EC2 has permissions 700

The command I'm running is: scp -i mykey.pem dumbtest.txt ubuntu@ec2-<my-ip>

Are there additional steps I need to take to scp into EC2's on a VPC?

1 Answer

Hello, Regarding SCP'ing into the VPC, I believe you are referring to SCPing into the EC2 instance. As per my understanding, the command you are using is a Pull command from the on-premise via the internet.

Have you verified the security groups and NACL settings to exactly what are you allowing in the rules. What is the error that you are getting once you try to copy the folder ? Is it starting and then stopping or you re getting a failure/denied error ?

Additionally, Is it possible/Have you tried to zip/compress the folder and then try to copy the same ? You can use gzip to compress the folder and then copy.

answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions