Transfer files between 2 Linux servers using scp


It is easy to upload file from your local machine to a remote machine via popular file transfer protocols such as ftp, sftp, but how to transfer files between 2 Linux servers with command lines? This article will mention about this need by using scp.

  1. First, we must have scp in both machines. Install openssh-clients:

    [bash]yum install openssh-clients[/bash]

  2. Login to the machine which the original file locates
  3. Run the following commands:
    [bash]scp your/local/file/path [email protected]_ip_or_domain:/remote/path[/bash]

About NhocConan

A super lazy guy who tries to write tech blog entries in English.He is lazy, so he can only write when he is in a good mood or when he is tired of coding.

Leave a comment

Your email address will not be published. Required fields are marked *