Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 11-23-2006, 08:57 AM   #1
Registered: Dec 2003
Distribution: Desktop: Slackware 13.1 &13.37 | Server: Debian 6.0
Posts: 270

Rep: Reputation: 32
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.

Old 11-23-2006, 09:06 AM   #2
Registered: Jan 2006
Location: Santa Cruz, CA
Distribution: Slack 10.2 and 11.0
Posts: 102

Rep: Reputation: 15
You are using the wrong syntax. You need to name the location on the server to place the file
 scp localfile user@server:/remotefile
Old 11-23-2006, 10:42 AM   #3
Alien Bob
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,796

Rep: Reputation: Disabled
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:
Old 11-24-2006, 04:13 AM   #4
Registered: Dec 2003
Distribution: Desktop: Slackware 13.1 &13.37 | Server: Debian 6.0
Posts: 270

Original Poster
Rep: Reputation: 32
oooooohhhhh ....

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




Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SCP: Copy file from remote linux server onto a windows machine? Tony Empire Linux - Newbie 21 09-22-2015 10:18 PM
SCP Copy File SSH petenyce Linux - Wireless Networking 2 10-05-2005 03:11 PM
copy files....using scp help me suguname Mandriva 2 01-26-2005 01:14 AM
copy files....using scp help me suguname Mandriva 5 01-25-2005 05:42 AM
SCP Copy from Linux to Windows? mhague Linux - Newbie 8 11-03-2004 01:56 PM

All times are GMT -5. The time now is 02:38 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration