strange behaviour with ssh / stdin

Darren Tucker dtucker at zip.com.au
Wed Oct 15 19:48:47 EST 2003


Roumen Petrov wrote:
> 
> Might is linux kernel(?), not ssh(!) problem.

Quite possibly.  Laurent has opened a kernel Bugzilla bug:
http://bugzilla.kernel.org/show_bug.cgi?id=1357

> As Laurent show ".../fd/0 -> socket:[27105]", i.e. on linux we have
> broken symbolic link - cat ".../fd/0" cannot found
> ".../fd/socket:[27105]" file.
> It is strange that cat without arguments work on linux.

Some food for thought: according to lsof (what did I do without lsof!)
there's a difference the the descriptors:

$ ssh localhost "lsof" | grep lsof |egrep '[012][rwu]'
lsof       4101 dtucker    0u  unix 0xc2d2c9e0           2530902 socket
lsof       4101 dtucker    1u  unix 0xc2d2c9e0           2530902 socket
lsof       4101 dtucker    2u  unix 0xcc975090           2530904 socket

stdin/out are both read-write sockets

$ ssh localhost "cat | lsof | cat" | grep lsof |egrep '[012][rwu]'
lsof       4216 dtucker    0r  FIFO        0,5           2533038 pipe
lsof       4216 dtucker    1w  FIFO        0,5           2533039 pipe
lsof       4216 dtucker    2u  unix 0xcad775a0           2533006 socket

stdin/out are unidirectional pipes.

What does this mean?  No idea.

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.




More information about the openssh-unix-dev mailing list