Cannot able to transfer file from bastion or jump server to EC2 instance.
While learning, I faced the issue of not being able to connect my bastion server or jump server to the EC2 instance for file transfer.
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@<Bastion-server-public-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@<Bastion-server-public-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