LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   scp does not copy to a server??? (https://www.linuxquestions.org/questions/slackware-14/scp-does-not-copy-to-a-server-504228/)

malo_umoran 11-23-2006 08:57 AM

scp does not copy to a server???
 
Hi,

I have a really strange problem today. I am trying to copy some files to my server with scp. I do this once a week, but today scp does not work. scp does not work with any server at all, not only with mine, and instead of copying file to a server, it creates new local copy.

look at this:

Code:

mm@x31:~/Desktop$ ls -la txt.sql
-rw-r--r--    1 mm      users        402 2006-02-02 16:01 txt.sql

mm@x31:~/Desktop$ scp -v -P12345 txt.sql mm@myserver
Executing: cp txt.sql mm@myserver

mm@x31:~/Desktop$ ls -la mm@myserver
-rw-r--r--    1 mm      users        402 2006-11-23 15:50 mm\@myserver

as you can see, it did not copy the file to "mm@myserver", but it created a new local file with name "mm@myserver".

this line "Executing: cp txt.sql mm@myserver" is strange. it runs "cp" instead of scp without visible reason for me. no mather what I do, it always creates a local copy and it shows no errors.

scp is not symlink to cp, or an alias or whatever.

any ideas????

Thanks a lot.

M.

ryanoa 11-23-2006 09:06 AM

You are using the wrong syntax. You need to name the location on the server to place the file
Code:

scp localfile user@server:/remotefile
Ryan

Alien Bob 11-23-2006 10:42 AM

Quote:

scp -v -P12345 txt.sql mm@myserver
Add a colon at the end to indicate it is a remote location you're referring to, otherwise scp will think it is a local copy and fall back to the "cp" program:
Code:

scp -v -P12345 txt.sql mm@myserver:
Eric

malo_umoran 11-24-2006 04:13 AM

oooooohhhhh ....

me stupid or blind :) ... no idea what happened :).

thanks

M.


All times are GMT -5. The time now is 06:02 PM.