Download file from remote server using SCP SSH command in Linux

Download file from remote server using SCP SSH command in Linux

Scp (Secure File copy) is a computer program for copying files using ssh protocol (Secure shell). it is included in most Linux/Unix distributions by default. It allows user to connect from local host to remote host using SSH and copy file between hosts it just some simple commands.

Using SCP SSH with Username and password

scp your_username@remote_host_ip_adrress:/remote/dir/filename.ext /local/dir

Using SCP SSH with private.key

scp -i private_key.pem your_username@remote_host_ip_adrress:/remote/dir/filename.ext /local/dir