Copying Files from Remote Server with SCP Command

ยท

1 min read

The SCP command, or secure copy, enables secure file transfers between a local host and a remote host, or between two remote hosts. For cases where you have data on the remote server and want to transfer it to your local machine, scpworks perfectly for those scenarios. Here's an example of how to use it:

scp ubuntu@<ip-address>:/home/ubuntu/Scripts/filename.csv .

Breaking down the example

SyntaxExample
Usernameubuntu
IP address of the host<ip-address>
Location of file on host/home/ubuntu/Scripts/filename.csv
Destination. (current directory)

๐Ÿ’ก TIP: You can also press tab to see what files are there in the remote directory and then proceed to choose the file

ย