How to copy file between linux machines

Vlad O.

Updated:

To copy a file between servers, there are several ways to achieve this. One of the most common methods is to use the “scp” command in a terminal window. This command stands for “secure copy” and is used to copy files securely between servers over a network.

How to copy file from local to server

scp /path/to/local/file remote_user@remote_host:/path/to/remote/file

How to copy file from server to local

scp remote_user@remote_host:/path/to/remote/file /path/to/local/file

How to copy file from server to server

scp [OPTION] [user@]src:]file1 [user@]dest:]file2
Posted in Tutorials tagged as linux terminal