How to transfer file from local system to AWS EC2...?
We cannot able to connect local system to AWS EC2 instance just because our key is visible, we just have to change the permission mode of that key.
Here the solution:
Open your terminal.
Connect your bastion server with local system by ssh command.
ssh -i /path/to/your-private-key.pem ec2-user@<EC2-IP>
Open WSL(Windows Subsystem for Linux).
Run:
chmod 400 /mnt/c/path/to/your-pem-key.pem
Run:
ls -l /mnt/c/path/to/your-pem-key.pem
Run:
scp -i ~/your-private-key.pem ~/your-pem-key.pem ubuntu@<EC2-IP>.
compute-1.amazonaws.com
:/home/ubuntu/
Thank you❤️
Subscribe to my newsletter
Read articles from Prem Choudhary directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Prem Choudhary
Prem Choudhary
DEVOPS ENGINEER || AWS || JAVA || PYTHON || SPRING BOOT || SPRING SECURITY || REACT.JS || MONGO DB || MYSQL