How do I copy a folder or file from remote to local host using scp
?
I use ssh
to log in to my server.
Then, I would like to copy the remote folder foo
to local /home/user/Desktop
.
How do I achieve this?
command-linecopyscpshellssh
How do I copy a folder or file from remote to local host using scp
?
I use ssh
to log in to my server.
Then, I would like to copy the remote folder foo
to local /home/user/Desktop
.
How do I achieve this?
Best Answer
By not including the trailing '/' at the end of foo, you will copy the directory itself (including contents), rather than only the contents of the directory.
From
man scp
(See online manual)