Exchange files and folders between local and remote machine with secure copy scp

You’d like to exchange data – files or folders – from a local machine to a remote one or visa verce?
scp (secure copy) is the tool of choice.

Copy local file to remote folder

scp localfile.txt user@

Copy local folder to remote folder

scp -r localfolder user@

Copy remote file to local folder

scp user@ /local-target-folder

Copy remote folder to local folder

scp -r user@ /local-target/folder