Below are the commands used to secure copy files from one Linux machine to another.
Pushing the files from the machine you are typing on, to another machine, requires the following format.
scp -rp filename_here remote_username@remote_machine_name:full_path_to_file
eg. scp -rp data.xml firstname.lastname@example.org:/usr/software/xml_files
Pulling the files from another machine, to the one that you are typing the command on, requires the following format.
scp -rp remote_username@remote_machine_name:full_path_to_file . “This ends with a space then dot (meaning current working directory on machine issuing command)”
scp -pr email@example.com:/usr/software/xml_files .
The -r is used to copy files/folders recursively.
The -p is used to preserve the original time stamps of the file.
-P Specifies the port to connect to on the remote machine
for more info type man scp at the command prompt