
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 shh. Unlike rcp, scp will ask for passwords or pass phrases if they are needed for authentication. Any file name may contain a host and user specification to indicate that the file is to be copied to/from that host. Copies between two remote hosts are permitted.
OPTIONS
• -a: Turn on statistics display for each file.
• -A: Turn off statistics display for each file.
• -cc cipher: Selects the cipher to use for encrypting the data transfer. This option is directly passed to ssh.
• -i identity_file: Selects the file from which the identity (private key) for RSA authentication is read. This option is directly passed to ssh.
• -L: Use non privileged port. With this you cannot use rhosts or rsarhosts authentications, but it can be used to bypass some firewalls that dont allow privileged source ports to pass. Same as saying “-o UsePriviledgePort=no” or -P to ssh; -L is used due to exhaustion of suitable letters.
• -o ssh-options: SSH options passed to ssh.
• -p: Preserves modification times, access times, and modes from the original file.
• -q: Turn off statistics display.
• -Q: Turn on statistics display.
• -r: Recursively copy entire directories.
Example
scp itsiti@aracici:/home/itsiti/ya.txt /home/hikari/
Note:
itsiti = Source user
aracici = Source Server hostname
/home/itsiti/ya.txt = Source file location
/home/hikari = Target location
This means that, you are executing the command from the target. Ensure that the target user, file is having a correct permission.


