LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-29-2003, 07:53 PM   #1
nauliv
LQ Newbie
 
Registered: Jun 2003
Distribution: RedHat
Posts: 5

Rep: Reputation: 0
Angry scp not working


Hello All,

Got a weird problem here... Trying to scp files from one machine to the other. Same subnet, same hub, and full authorization on iptables...

Ssh works just fine, but after asking for the password, scp just to back to the prompt without doing anything...

Both machines have the following into their sshd_config file:
Subsystem sftp /usr/libexec/openssh/sftp-server

But when trying to do:
#scp user@1.2.3.4:/root/filename.txt filename.txt
root@1.2.3.4's password:
#

and nothing has been copied... Same thing from both machines, trying to retrieve or send a file.

When going verbose, the result is:

debug1: channel 0: write failed
debug1: channel 0: close_write
debug1: channel 0: output open -> closed
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: rcvd eof
debug1: channel 0: rcvd close
debug1: channel 0: almost dead
debug1: channel 0: gc: notify user
debug1: channel 0: gc: user detached
debug1: channel 0: send close
debug1: channel 0: is dead
debug1: channel 0: garbage collecting
debug1: channel_free: channel 0: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.1 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 0

The error probably is this "write failed", but both local and remote users are root, and iptables allow all packets to go through....

Any idea ?

Thanks so much.
 
Old 06-29-2003, 09:30 PM   #2
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 49
Are you trying to do this as root on both machines? If the user@1.2.3.4 doesn't have read permission in /root, the scp will fail (though it should fail with an error message). Do you have write permission in the directory you are attempting to write the file?
 
Old 06-30-2003, 01:16 AM   #3
nauliv
LQ Newbie
 
Registered: Jun 2003
Distribution: RedHat
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for your e-mail, moses.

Yes, actually I always use root@xxxx for connecting.
ssh configuration allows root users to connect on both machines.

Now that we talk about it, I made tests with regular user, and trying to copy files to/from /home/user/ directories... same result!

I can't believe it, there must be some explanation!!!! :-O
 
Old 06-30-2003, 02:13 AM   #4
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,876

Rep: Reputation: 88
Hello, nauliv,
It's late and I don't see where you define which way you are moving the files.
The scp command goes something like:
scp <take this file> <and put it here>
So, to move a file from the local TO the remote:
scp myfile login@remoteip:/full/path/myfile
To copy a file FROM the remote:
scp login@remoteip:/full/path/myfile myfile
Maybe this helps?
scp should work if ssh does.
 
  


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 does not work and gives the following error message: scp: FATAL: Executing ssh1 i akay Linux - Networking 16 09-28-2008 11:41 PM
Inbound scp not working gauge73 Linux - Networking 6 05-07-2005 02:04 PM
ssh/scp without password not working Mauline Linux - Security 4 03-30-2005 09:26 PM
ssh working, but not sftp scp hardigunawan Linux - Networking 2 05-02-2003 02:04 AM
Help with SCP lfindle Linux - Newbie 14 07-09-2002 02:08 PM


All times are GMT -5. The time now is 06:58 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration