In my terminal shell, I ssh'ed into a remote server, and I cd
to the directory I want.
Now in this directory, there is a file called table
that I want to copy to my local machine /home/me/Desktop
.
How can I do this?
I tried scp table /home/me/Desktop
but it gave an error about no such file or directory.
Does anyone know how to do this?
Best Answer
The syntax for
scp
is:If you are on the computer from which you want to send file to a remote computer:
Here the
remote
can be a FQDN or an IP address.On the other hand if you are on the computer wanting to receive file from a remote computer:
scp
can also send files between two remote hosts:So the basic syntax is:
You can read
man scp
to get more ideas on this.