scp, aws, amazon linux 2,

Install SCP on Amazon Linux 2

Apr 19, 2022 · 1 min read · Post a comment

SCP is one of the most common tool for transferring files between remote and local machines. It can be also used for moving files or directories within the same machine. It uses a minimalistic approach, and it’s easy to use it. Let’s see how to install SCP on Amazon Linux 2.

Prerequisites

  • Amazon Linux 2
  • sudo privileges

Install SCP on Amazon Linux 2

Step 1. Update the yum packages.

sudo yum update

Step 2. Install SCP as a part of OpenSSH server and the OpenSSH client packages.

sudo yum install openssh-clients openssh

Step 3. Copy a local file to a remote machine.

scp backup.zip [email protected]:/home/devcoops

To copy a directory from local to remote machine, run:

scp -r /home/files [email protected]:/home/devcoops

Step 4. Copy a remote file to a local machine.

scp [email protected]:/home/backup.zip /home/devcoops

Step 5. Copy a file between two remote machines.

scp [email protected]:/home/files/db.sql [email protected]:/home/devcoops

Conclusion

Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.