ssh_fxp_name

Damien Miller djm at mindrot.org
Fri Oct 30 11:11:00 EST 2009


On Fri, 29 Oct 2009, qqq  wrote:

> Hello,
> 
> I have a very basic sftp client which is able to successfully
> intialize the transport layer, password authenticate, and start the
> sftp subsystem. Now, I am stuck with an issue when I try to retrieve
> the directory listing. Sometimes I get a transport packet in which the
> sftp packet length field registers a length greater than the enclosing
> transport packet. In othet words sometimes I get a transport packet
> whose lenght is less than what the sftp packet length field registers.
> This happens only sometimes. That is, if I give SSH_FXP_READDIR
> commands say 30 times on the same directory, then I get this packet
> after around 25-30 iterations. I tried to check the readability of the
> socket when this happens but the server does not send anything after
> this and select just hangs. I am not able to think of why this is
> happening and would apprecaite pointers in the right direction. thanks

sftp operates at a protocol layer above the SSH transport, so the size of
sftp's packets may exceed the maximum allowed by the ssh connection. In
these cases, a sftp packet may span multiple transport packets.

-d



More information about the openssh-unix-dev mailing list