How to transfer files from AWS server to local machine
Following is the way all the machines are located
AWS machine -> Bastion server -> Local machine
I have copied the files from AWS machine to Bastion server and Bastion server to local machine with SCP command
Following are the two steps I have done
- ssh into bastion server Copied file from AWS instance to Bastion server
scp user@ipaddress:~/test1.txt ./
- From my local machine, I have executed the following command
scp user@bastion:~/test1.txt ./
I would like to automate with a single script which needs to be triggered from my local machine for copying files from AWS instance to local machine