Copy the file “test.txt” from a remote host to the local host

scp username@host.com:test.txt /local/directory

Copy the file “test.txt” from the local host to a remote host

scp test.txt username@host.com:/remote/directory

Copy the directory “test” from the local host to a remote host’s directory

scp -r test username@host.com:/remote/directory