How to SCP an entire folder in Linux

In this short article we will see How to SCP an entire folder in Linux. This task is very important to know when you work as a system administrator. The SCP option that allows us to do this is the -r option, and is stands for:

-r Recursively copy entire directory
Here is how you can SCP an entire folder
scp -r /path/folder/ user@server.com:/path/to/folder
Here is how you can SCP remotely as well an entire folder
scp -r user@server.com:/path/to/folder /path/folder/