Current Article:

How to download a file from server using SSH?

How to download a file from server using SSH?

In your terminal, type:

scp [email protected]:file.txt /local/dir

replacing the username, host, remote filename, and local directory as appropriate.

If you want to access EC2 (or other service that requires authenticating with a private key), use the -i option:

scp -i key_file.pem [email protected]:/remote/dir/file.txt /local/dir