View previous topic :: View next topic |
Author |
Message |
gentoo4erik n00b
Joined: 04 Nov 2004 Posts: 12
|
Posted: Fri Jan 20, 2006 8:33 pm Post subject: scp problem [SOLVED] |
|
|
Hoi, hoi,
I got a problem while trying to transfer my files from my local machine to a remote machine (located somewhere on the net). When I use WinSCP under Windows everything works, but not with Gentoo.
I use the command
Code: | scp -vvv file.txt name@host:~
|
I can login without problem. But after that the process stalls. Here is the verbose output:
Code: | debug2: input_userauth_info_req: num_prompts 1
Password:
debug3: packet_send2: adding 32 (len 22 padlen 10 extra_pad 64)
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 0
debug3: packet_send2: adding 48 (len 10 padlen 6 extra_pad 64)
debug1: Authentication succeeded (keyboard-interactive).
debug2: fd 4 setting O_NONBLOCK
debug2: fd 5 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Entering interactive session.
debug2: callback start
debug2: client_session2_setup: id 0
debug1: Sending command: scp -v -t ~
debug2: channel 0: request exec confirm 0
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 131072
|
After that, nothing happens and after a couple of minutes I terminate the command. The file is not copied to the remote host. Does anyone know what is happening here ? Does anybody have a solution ?
Groetjes,
Erik
Last edited by gentoo4erik on Sat Jan 21, 2006 9:32 pm; edited 1 time in total |
|
Back to top |
|
|
JRV Apprentice
Joined: 10 Jan 2004 Posts: 291
|
Posted: Sat Jan 21, 2006 1:43 am Post subject: Re: scp problem |
|
|
Just for info,
I tried scp -vvv (of course, it's working here) and I get exactly the same output, but mine goes on like this:
Quote: |
[exactly the same output you had]
...
Sending file modes: C0644 20480 test.dat
debug2: channel 0: rcvd ext data 27
Sink: C0644 20480 test.dat
debug2: channel 0: written 27 to efd 6
test.dat 100% 20KB 20.0KB/s 00:00
debug2: channel 0: read<=0 rfd 4 len 0
debug2: channel 0: read failed
debug2: channel 0: close_read
debug2: channel 0: input open -> drain
debug2: channel 0: ibuf empty
debug2: channel 0: send eof
debug2: channel 0: input drain -> closed
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: obuf empty
debug2: channel 0: close_write
debug2: channel 0: output drain -> closed
debug2: channel 0: rcvd close
debug3: channel 0: will not send data after close
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
#0 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cfd -1)
debug3: channel 0: close_fds r -1 w -1 e 6 c -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
|
So there aren't any errors in your output, it just stops for some weird reason...
JRV |
|
Back to top |
|
|
splooge l33t
Joined: 30 Aug 2002 Posts: 636
|
Posted: Sat Jan 21, 2006 8:40 am Post subject: |
|
|
This might seem rather dumb but ... try removing the trailing ~ ... it will go to your homedir if you just type user@host:
On my BSD box at work when I did it with a trailing ~ I ended up with a file named '~' in my homedir. I could see this being a potential problem. (rm -r ~ ... what might that do? delete the file? or delete the homedir itself? depending on where I typed the command?)
Stupid, I know, but ... whatever. Just a theory. _________________ http://get.a.clue.de |
|
Back to top |
|
|
gentoo4erik n00b
Joined: 04 Nov 2004 Posts: 12
|
Posted: Sat Jan 21, 2006 7:36 pm Post subject: re scp problem |
|
|
Quote: | This might seem rather dumb but ... try removing the trailing ~ ... it will go to your homedir if you just type user@host: |
I tried it without the trailing ~.This doesn't help. Still no file transferred. The process stalls again.
I do not know if this matters: The remote host is not linux based, but uses FreeBSD 4.10-RELEASE-p2 i386. Is it possbile that Linux does not "speak" well with FreeBSD for some reason?
Groetjes,
Erik |
|
Back to top |
|
|
gentoo4erik n00b
Joined: 04 Nov 2004 Posts: 12
|
Posted: Sat Jan 21, 2006 9:31 pm Post subject: |
|
|
Ok solved.
The problem was that on the remote side the standard shell is the tc-shell. So I had a .tcshrc that started /bin/bash which started .bashrc
And there it went wrong. Scp (and sftp) didn't like that.
When I removed .tcshrc on the remote host (so /bin/bash was not started) scp worked fine !!!
I even found some information about that in the openssh faq:
Quote: | 2.9 - sftp/scp fails at connection, but ssh is OK.
sftp and/or scp may fail at connection time if you have shell initialization (.profile, .bashrc, .cshrc, etc) which produces output for non-interactive sessions.
|
I do not quite understand the "output". There is no output when starting bash (or it must be that bash gives another prompt than tc).
But anyhow: it is working.
Thanks JVR and sploogle for helping me
Groetjes,
Erik |
|
Back to top |
|
|
|