Hi Guillaume, Thanks! This sounds promising. I do realize that it's up to the client to show the error, so this is not a foolproof mechanism by any measure.
Is there an exception that I can throw from which the exception message is automatically inserted to the SSH_FX_FAILURE status? Or do I have to modify the SftpSubsystem? Sampo On Thu, Sep 4, 2014 at 12:07 PM, Guillaume Nodet <gno...@apache.org> wrote: > When an exception occurs in the SftpSubsystem, a SSH_FX_FAILURE status will > be sent back to the user with the exception message. This could be a way > for you to send a custom message. > As to whether it will be displayed by the client or not, i've no idea, and > I suppose it depends on the client... > > > 2014-09-04 10:53 GMT+02:00 Sampo Savolainen <sampo.savolai...@spatineo.com > >: > > > Hi, > > > > I asked this on the users mailing list last week, but got no reply. As > this > > list seems to be more active, I thought I'd see if anyone here could > answer > > my question. > > > > I'm using the org.apache.sshd to run a custom sftp server that receives > > files from users. The server imposes some restrictions on what kinds of > > files it will accept. The problem is that though these restrictions are > > documented, the users sometimes get confused by the server not accepting > a > > file. Does the sftp protocol allow for the server to send a custom string > > to the user which (hopefully) the client software will present to the > user? > > If so, how can I get SSHD to send such messages to the clients? > > > > > > Sampo > > > > -- > > Sampo Savolainen > > R&D Director, Spatineo Oy > > sampo.savolai...@spatineo.com > > +358-407555649 > > Linnankoskenkatu 16 A 17, 00250 Helsinki, Finland > > www.spatineo.com, twitter.com/#!/spatineo > > www.linkedin.com/company/spatineo-inc > > > > This message may contain privileged and/or confidential information. If > you > > have received this e-mail in error or are not the intended recipient, you > > may not use, copy, disseminate, or distribute it; do not open any > > attachments, delete it immediately from your system and notify the sender > > promptly by e-mail that you have done so. > > > -- Sampo Savolainen R&D Director, Spatineo Oy sampo.savolai...@spatineo.com +358-407555649 Linnankoskenkatu 16 A 17, 00250 Helsinki, Finland www.spatineo.com, twitter.com/#!/spatineo www.linkedin.com/company/spatineo-inc This message may contain privileged and/or confidential information. If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate, or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so.