15 SCP Commands Securely Copy Files To Remote Servers Linux
15 SCP Commands Securely Copy Files To Remote Servers Linux
scp copies files between hosts on a network. It uses SSH for data transfer, and
uses the same authentication and provides the same security as SSH. Unlike rcp,
scp will ask for passwords or passphrases if they are needed for authentication.
scp commands
preserving attributes
5. Compress and copy files /
directories faster – 15 scp commands
examples
Using ‘-C’ option will compress and copy the files / directories to destination.
Data compression will happens in Network level and destination receives data
size as it is in source.
[root@TechTutorials ~]# scp -C linux-nrpe-agent.tar.gz
[email protected]:/root/
[email protected]'s password:
Now Create a file anywhere where to keep script file. In this example i want to
keep my script in /scripts/ directory
# vi /scripts/multiscp.sh
#!/bin/bash
## Author: Ankam Ravi Kumar
## Purpose: Copy files to multiple Server using single script
## Date: 21st July 2016
echo -e "Please Enter the file path which you want to copy:\c"
read file
Conclusion
15 scp commands which makes our life easy to copy files/directories instantly
to remote servers. scp command examples are most useful for transferring files
and directory content from one server to another server.