You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Andreas Johansson <fr...@gmail.com> on 2010/07/29 16:10:41 UTC

[SSHD] SFTP does not support v3

Hi,

The current SFTP implementation in SSHD does not support v3 (Section
7) of the standard which the widely used JSch client currently only
support. The issue is in section 9.3 of the v6 standard:

"9.3.  Data Response

   The SSH_FXP_DATA response has the following format:

       byte   SSH_FXP_DATA
       uint32 request-id
       string data
       bool   end-of-file [optional]"

The last byte end-of-file corrupts the datastream when used with the
JSch client and since it's optional I would like to disable/remove it
from the SSHD code to support more clients. What do you think?


References:

[Version 3]
SSH File Transfer Protocol, Draft 02, October 2001 -
http://tools.ietf.org/html/draft-ietf-secsh-filexfer-02

[Version 6]
SSH File Transfer Protocol, Draft 13, July 2006 -
http://tools.ietf.org/html/draft-ietf-secsh-filexfer-13


//Andreas

Re: [SSHD] SFTP does not support v3

Posted by Emmanuel Lecharny <el...@gmail.com>.
  On 7/29/10 4:10 PM, Andreas Johansson wrote:
> Hi,

Hi,

thanks for the mail, but could you create a JIRA ? Mails are likely to 
be lost in a few weeks, JIRA wil remain until either implemented or 
discarded.

Many thanks !


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: [SSHD] SFTP does not support v3

Posted by David Latorre <dv...@gmail.com>.
2010/8/3 Thomas Charron <tw...@gmail.com>:
> On Thu, Jul 29, 2010 at 10:10 AM, Andreas Johansson
> <fr...@gmail.com> wrote:
>> Hi,
>>
>> The current SFTP implementation in SSHD does not support v3 (Section
>> 7) of the standard which the widely used JSch client currently only
>> support. The issue is in section 9.3 of the v6 standard:
>
>>       bool   end-of-file [optional]"
>>
>> The last byte end-of-file corrupts the datastream when used with the
>> JSch client and since it's optional I would like to disable/remove it
>> from the SSHD code to support more clients. What do you think?
>
>  Curiouse, if the client doesn't support it, why, exactly, is it a
> bug in the server when the specification clearly shows it as being
> optional, (aka, the servers choice)?

I partially agree with Thomas here, it is not Mina SSHD that doesn't
correctly support the standard but Jsch. I would try to open in issue
so they add support for this EOF character. Still, It is true that
JSCH is widely used in java environments so I would suggest that we
add a configuration parameter so the use of an EOF delimiter can be
activated/deactivated. We should then check if the default must be "no
eof" or "please, eof" :)

Are you ok with this, Andreas? You can open a JIRA issue in that case
- I would advice against just removing the EOF delimiter as it is
possible that some other clients do expect this byte and start failing
if we remove it :)


> --
> -- Thomas
>

Re: [SSHD] SFTP does not support v3

Posted by Thomas Charron <tw...@gmail.com>.
On Thu, Jul 29, 2010 at 10:10 AM, Andreas Johansson
<fr...@gmail.com> wrote:
> Hi,
>
> The current SFTP implementation in SSHD does not support v3 (Section
> 7) of the standard which the widely used JSch client currently only
> support. The issue is in section 9.3 of the v6 standard:

>       bool   end-of-file [optional]"
>
> The last byte end-of-file corrupts the datastream when used with the
> JSch client and since it's optional I would like to disable/remove it
> from the SSHD code to support more clients. What do you think?

  Curiouse, if the client doesn't support it, why, exactly, is it a
bug in the server when the specification clearly shows it as being
optional, (aka, the servers choice)?

-- 
-- Thomas