scp path/to/source.txt user@localhost:path/to/destinationFolder
scp -r -p chemin/vers/dossier/source user@serveur2:chemin/vers/dossier/destination
# To scp a file to the Desktop directory within your home directory type:
scp -P 2500 file_name.txt ece373@localhost:Desktop/
# To scp a file from your VM to your desktop type:
scp -P 2500 ece373@localhost:Desktop/file_name.txt file_name.txt
scp source_location destination
'source_location' => location of the file you want to copy.
'destination' => location of the directory you want to paste the file.
Consider you want to copy file from the server in your current diractory
'scp root@server1:location/to/file .'
scp [options] username1@source_host:directory1/filename1 username2@destination_host:directory2/filename2
scp [OPTION] [[user@]SRC_HOST:]file1 [[user@]DEST_HOST:]file2