How to use SCP command in Linux to copy a file from one server to another. it is used to secure copy a file to or from a remote server. Linux the essential for DevOps Roles.
SCP command example
Copy file from one client location to another server location
$ scp /tmp/local.conf firstname.lastname@example.org:/home/huupv
Use “-r” recursive option to copy directory and sub-directories.
$ scp -r email@example.com:/home/huupv/* ./your-workspace
To copy the remote file to the local directory
$ scp firstname.lastname@example.org:/home/huupv/file-remote.txt /local/folder
Copying a local file to remote directory
$ scp local-text.txt email@example.com:/home/huupv
Using key files like ssh command 🙂
$ scp -i your_key.pem local-text.txt firstname.lastname@example.org:/home/huupv
Thought the article, you can use “SCP command example” as above. I hope will this your helpful.