-   Slackware (
-   -   scp does not copy to a server??? (

malo_umoran 11-23-2006 08:57 AM

scp does not copy to a server???

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:


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.


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

scp localfile user@server:/remotefile

Alien Bob 11-23-2006 10:42 AM


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:

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

malo_umoran 11-24-2006 04:13 AM

oooooohhhhh ....

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



All times are GMT -5. The time now is 11:04 PM.