0
I am getting an error when I try to copy a file from my local computer to a remote server. I get the same error whether I use cp
or scp
.
Here is my input at the resulting error:
[root@xxx.xx.xxx.xx /]# cp /home/username/some.xml root@xxx.xx.xxx.xx:/path/to/directory/
cp: cannot stat â/home/username/some.xmlâ: No such file or directory
I have checked, and there is definitely a file at the path /home/username/some.xml
on my local machine.
Both the local computer and the remote server are running CentOS 7. How can I resolve this error and copy successfully?
My
cp
command in my OP above was correct with two minor modifications. 1.) I had to typeexit
to log out asroot@remote.server
and thus get a prompt on my local machine, and 2.) I had to changecp
toscp
in order to send the data to the remote web server. Since your answer pointed me in the right direction, I am accepting, it, but the solution was what I am typing in this comment. +1 for helping. â CodeMed â 2014-12-09T21:17:25.907