LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-19-2010, 04:02 PM   #1
tibberous
Member
 
Registered: Oct 2004
Posts: 56

Rep: Reputation: 15
Server to server file copy through SCP or wget


I am trying to copy a directory and everything in it from one server to another.

No matter what I type into SCP, it just gives me back:

usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]

I tried:

scp -r -P 1133 root@XX.XX.XX.XX:/home/images

Shouldn't that recursively copy /home/images from the server XX.XX.XX.XX through SSH on port 1133?

Btw - I know you can do it with a tar or just a regular FTP program. The folder I am trying to copy is 40 gig, there isn't enough free space to make a tar (if the server would even do it)

Last edited by tibberous; 12-19-2010 at 04:04 PM. Reason: .
 
Old 12-19-2010, 04:08 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Code:
root@XX.XX.XX.XX:/home/images
There are no spaces in that. So you're combining your source and destination into one, and since you didn't give scp both a source and a destination, it doesn't know what you mean and prints a usage summary at you.

I can't tell from your wording what you want to do. Try something like (on the source server)
Code:
scp -r -P 1133 /home/images root@z.z.z.z:/foo/bar
where /foo/bar is the folder you want it to go on z.z.z.z.

Last edited by AlucardZero; 12-19-2010 at 04:09 PM.
 
Old 12-19-2010, 04:12 PM   #3
tibberous
Member
 
Registered: Oct 2004
Posts: 56

Original Poster
Rep: Reputation: 15
Somewhat better. Except now I get:

reverse mapping checking getaddrinfo for XX.XX.XX.XX.static.dimenoc.com failed - POSSIBLE BREAK-IN ATTEMPT!
root@XX.XX.XX.XX's password: (I type the password)
stdin: is not a tty

Any ideas?
 
Old 12-19-2010, 04:16 PM   #4
tibberous
Member
 
Registered: Oct 2004
Posts: 56

Original Poster
Rep: Reputation: 15
Is there any way I can enter the password as part of the first command? Don't really care if it is secure or not at this point.
 
Old 12-19-2010, 05:30 PM   #5
tibberous
Member
 
Registered: Oct 2004
Posts: 56

Original Poster
Rep: Reputation: 15
Guess I'll just run Filezilla for 6 days =/
 
Old 12-19-2010, 05:51 PM   #6
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
The "stdin: is not a tty" is because you have something in your .*profile or .*rc on the remote machine has a statement that requires a tty (for an interactive login) but SCP is non-interactive. Find the offending statements and comment them out or add if logic so they only run when the shell is interactive.

http://www.google.com/search?num=30&...=&oq=&gs_rfai=
 
Old 12-19-2010, 06:08 PM   #7
tibberous
Member
 
Registered: Oct 2004
Posts: 56

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by AlucardZero View Post
The "stdin: is not a tty" is because you have something in your .*profile or .*rc on the remote machine has a statement that requires a tty (for an interactive login) but SCP is non-interactive. Find the offending statements and comment them out or add if logic so they only run when the shell is interactive.

http://www.google.com/search?num=30&...=&oq=&gs_rfai=
That's what Google said, but I'm not sure how to find the tty line (or what I'm looking for)

I changed /etc/bashrc:

LS_OPTIONS='--color=tty -F -a -b -T 0';

to

LS_OPTIONS='--color=-F -a -b -T 0';

And rebooted, but it still gives me the same message.
 
  


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
Need to copy file (scp) to Debian server when reached 150 kb spaceuser Linux - Newbie 1 07-20-2008 03:56 PM
scp does not copy to a server??? malo_umoran Slackware 3 11-24-2006 04:13 AM
wget a random file on phone server sub_moa Programming 16 07-01-2005 05:56 PM
Any somebody tell me HOW can I get the file list from ftp(http) server by wget? wuzhong Linux - Networking 2 09-07-2004 08:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:59 PM.

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