FreeKB - How to transfer files using secure copy protocol (SCP)
How to transfer files using secure copy protocol (SCP)

Home > Search > How-to


Secure copy protocol (SCP) can be used to transfer a file from one computer to another. For example, let's say you want to transfer example.jpg from Machine 1 to Machine 2. The machine the file is being transfered to must be an SSH server. Before using SCP, it is usually best to ensure you can connect to an SSH server.

 


Windows (upload / PUT)

In this example, example.jpg is transferred from server1 to server2.

scp C:\users\john.doe\example.jpg jane.doe@machine2:C:\users\jane.doe\
example.jpg        100$ 12  0.7KB/s  00:02

 


Windows (download / GET)

In this example, example.jpg is transferred from server2 to server1.

scp jane.doe@machine2:C:\users\jane.doe\example.jpg C:\users\john.doe\
example.jpg        100$ 12  0.7KB/s  00:02

 


Mac / Linux (upload / PUT)

In this example, example.jpg is transferred from server1 to server2.

[john.doe@server1 ~]# scp /home/john.doe/example.jpg jane.doe@server2:/home/jane.doe/
example.jpg        100$ 12  0.7KB/s  00:02

 


Mac / Linux (download / GET)

In this example, example.jpg is transferred from server2 to server1.

[john.doe@server1 ~]# scp jane.doe@server2:/home/jane.doe/example.jpg /home/john.doe
example.jpg        100$ 12  0.7KB/s  00:02

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments