How do I copy a folder from remote to local host using
ssh to log in to my server.
Then, I would like to copy the remote folder
foo to local
How do I achieve this?
scp -r email@example.com:/path/to/foo /home/user/Desktop/
By not including the trailing “https://stackoverflow.com/” at the end of foo, you will copy the directory itself (including contents), rather than only the contents of the directory.
man scp (See online manual)
-r Recursively copy entire directories