12
4
I am trying to copy a file from my other computer, to another computer. (both running Ubuntu 9.10)
So, I've ssh'ed into the other computer; I cd
to the directory; and I entered cp File.zip /home/me/Desktop
as file.zip
is located in the directory I just used cd
with.
Now, it gives me the following error message:
cannot create regular file '/home/me/Desktop': no such file or directory
What do I have to do?
can we retrieve multiple files? – ZhaoGang – 2018-08-01T02:50:14.367
how does that work when i am sshed into the other computer on the computer where i want to copy the file to? Because when i try like
scp file.zip me@xxx.xxx.xx.xxx:/home/me/Desktop
, it says 'connection refused', probably because it is the computer im on. How to? – Deniz Zoeteman – 2010-01-06T18:15:32.783The syntax is
src_file dest_file
, where either can be just a filename on a local computer (file.zip), or a remote file (me@xxx.xxx.xx.xxx:/home/me/Desktop). So if you want to pull a files from a remote machine to the local machine, you would doscp xxx.xxx.xx.xxx:/home/me/Desktop/file.zip file.zip
.Note that local and remote are relative to the machine you are running the scp. So if you are on machine A, ssh to machine B and do an scp, B is local and A is remote. – KeithB – 2010-01-06T18:23:10.520
It still gives the same error as i shown in the question – Deniz Zoeteman – 2010-01-06T18:34:41.213
when i try to do it from local machine, it says 'no route to host' or something like that... probably because it is protected with a password. – Deniz Zoeteman – 2010-01-06T18:38:38.290
sftp is another good option if you're comfortable with ftp and are doing this manually. – Brian Knoblauch – 2010-01-06T20:08:23.133
@TutorialPoint: 'no route to host' indicates you have a general networking problem, not an scp problem. Try http://www.cyberciti.biz/tips/no-route-to-host-error-and-solution.html
– DaveParillo – 2010-01-06T20:09:34.550