[ 
https://issues.apache.org/jira/browse/SSHD-1320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17694120#comment-17694120
 ] 

Lyor Goldstein commented on SSHD-1320:
--------------------------------------

First of all, I would strongly advise +against+ custom error messages. It is a 
non-standard bottomless pit fraught with nothing but heartache. If, however, 
you insist on walking this path, please read [Internal exceptions and error 
message 
handling|https://github.com/apache/mina-sshd/blob/master/docs/sftp.md#internal-exceptions-and-error-message-handling]
 and [Intercepting data sent via STDERR channel data from the 
client|https://github.com/apache/mina-sshd/blob/master/docs/sftp.md#intercepting-data-sent-via-stderr-channel-data-from-the-client]
 and [Sending custom data via STDERR channel data to the 
client|https://github.com/apache/mina-sshd/blob/master/docs/sftp.md#sending-custom-data-via-stderr-channel-data-to-the-client]

> how to suppress "Can't ls  "some file" not found and just show error message
> ----------------------------------------------------------------------------
>
>                 Key: SSHD-1320
>                 URL: https://issues.apache.org/jira/browse/SSHD-1320
>             Project: MINA SSHD
>          Issue Type: Question
>            Reporter: Sreedhar J
>            Priority: Major
>
> Using the Apache SFTP Server, we are able to send custom error message by 
> writing it to IoAsync Error streams.  Error messages are shown at the client 
> side, but one extra message is shown at the client as below for the "ls " 
> command
> sftp> ls hide.txt
> invalid ls command, can not list hidden file 
> Can't ls: "/hide.txt" not found
> In the above  at the sftp command prompt, when we give  ls hide.txt,   Server 
> is sending the desired error message as "invalid ls command , can not list 
> hiddent files".  but along with this error message one more extra message was 
> seen "*Can't ls: "/hide.txt" not found*" . So how to get rid of this "Can't 
> ls..." message, just to have error message.   What needs to be customized on 
> the Apache SFTP Server side?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org

Reply via email to