How to copy remote file or directory ?

To copy remote file or directory in Linux, you can use scp (Secure Copy) command where the first parameter represents copied resource and the second one the destination. For example, to copy test.txt from remote server called "sunshine", this command could be usefull:
scp bartosz@sunshine:/tmp/test.txt /home/bartosz
To copy one directory, we should add -r flag into the command. This flag marks the copy as "recursive". In general, scp is based on secured transfer through ssh. Thanks to it, the same authentication and security level are provided.