How to copy file from AWS instance

We gonna use scp utility for this:

scp -i ~/path/to/key user@aws-instance-url-or-ip:~/path/to/remote.file ~/path/to/local.file

user — is the user you log in using ssh command

~/path/to/key — your private key, you can omit if your key lies inside ~/.ssh dir

path/to/remote.file — path to file you wanna copy which lies inside user home directory on aws instance

~/path/to/local.file — where to save the file on local machine

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.