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?
How to copy a file from a remote server to a local machine?
scp;cp
The syntax for scp is:If you are on the computer from which you want to send file to a remote computer:scp /file/to/send username@remote:/where/to/putHere 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 username@remote:/file/to/send /where/to/putscp can also send files between two remote hosts:scp username@remote_1:/file/to/send username@remote_2:/where/to/putSo the basic syntax is:scp username@source:/location/to/file username@destination:/where/to/putYou can read man scp to get more ideas on this.