LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-23-2006, 08:57 AM   #1
malo_umoran
Member
 
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???


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.
 
Old 11-23-2006, 09:06 AM   #2
ryanoa
Member
 
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
Code:
 scp localfile user@server:/remotefile
Ryan
 
Old 11-23-2006, 10:42 AM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120
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
 
Old 11-24-2006, 04:13 AM   #4
malo_umoran
Member
 
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 .

thanks

M.
 
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:15 AM.

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