Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 06-29-2003, 08:53 PM   #1
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@ filename.txt
root@'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, 10:30 PM   #2
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@ 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, 02:16 AM   #3
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, 03:13 AM   #4
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.


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-29-2008 12:41 AM
Inbound scp not working gauge73 Linux - Networking 6 05-07-2005 03:04 PM
ssh/scp without password not working Mauline Linux - Security 4 03-30-2005 10:26 PM
ssh working, but not sftp scp hardigunawan Linux - Networking 2 05-02-2003 03:04 AM
Help with SCP lfindle Linux - Newbie 14 07-09-2002 03:08 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:40 PM.

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