SCP Problem
Kurt Wall
kwall at kurtwerks.com
Fri Oct 26 19:39:10 PDT 2007
On Fri, Oct 26, 2007 at 09:26:18AM -0700, Bill Campbell wrote:
> On Thu, Oct 25, 2007, Kurt Wall wrote:
> >On Fri, Oct 26, 2007 at 11:34:22AM +1000, james at jamesmcdonald.id.au wrote:
> >> > On Thu, Oct 25, 2007 at 03:37:56PM +1000, James McDonald wrote:
> >> >> Kurt Wall wrote:
> >> >>> Hola, list,
> >> >
> >> > [scp broken]
> >> >
> >> >> Does sftp work?
> >> >
> >> > Nope.
> >> >
> >> The reason I ask is that I'm curious if the entire scp / sftp subsytem is
> >> not configured/enabled on the remote box?
> >
> >I'm pretty sure it is because I can ssh to the remote box and then scp
> >files to and from it. I just can't use scp when the remote system is on
> >the other end of the transaction.
>
> Is it possible that scp is not in the PATH that ssh sees on the
> remote system?
>
> Try ``ssh remote which scp'' or perhaps ``ssh remote echo '$PATH' ''
Interesting result, in that it doesn't work:
$ strace -o strace.out ssh kurtwerks.org which scp
Nothing happens, so I Ctl-C out of the session. The tail end of the
strace looks like this:
getsockopt(3, SOL_TCP, TCP_NODELAY, [0], [4]) = 0
setsockopt(3, SOL_TCP, TCP_NODELAY, [1], 4) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(33961),
sin_addr=inet_addr("192.168.1.101")}, [16]) = 0
setsockopt(3, SOL_IP, IP_TOS, [8], 4) = 0
select(7, [3], [3], NULL, NULL) = 1 (out [3])
write(3, "\267=\rf5\f\335!K\27\200\212\356\367z\16U\2512\6\311y\260"...,
128) = 128
select(7, [3], [], NULL, NULL) = 1 (in [3])
read(3, "\260\0\20.O\36\355\f<q\t\2353\324\343D\6\355T\277\277\373"...,
8192) = 48
select(7, [3 4], [], NULL, NULL
So, it's waiting for input on file descriptors 3 and 4. The pid is
23328, so:
$ ls -l /proc/23328/fd/
lrwx------ 1 kwall kwall 64 2007-10-26 22:26 0 -> /dev/pts/2
lrwx------ 1 kwall kwall 64 2007-10-26 22:26 1 -> /dev/pts/2
lrwx------ 1 kwall kwall 64 2007-10-26 22:26 2 -> /dev/pts/2
lrwx------ 1 kwall kwall 64 2007-10-26 22:26 3 -> socket:[117451]
lrwx------ 1 kwall kwall 64 2007-10-26 22:26 4 -> /dev/pts/2
lrwx------ 1 kwall kwall 64 2007-10-26 22:26 5 -> /dev/pts/2
lrwx------ 1 kwall kwall 64 2007-10-26 22:26 6 -> /dev/pts/2
Just for giggles, I tried the same thing from another system (a BSD
system at work) and got the same result.
As before, though, plain vanilla SSH works just fine.
Very strange.
Kurt
--
The man who sets out to carry a cat by its tail learns something that
will always be useful and which never will grow dim or doubtful.
-- Mark Twain
More information about the Linux-users
mailing list