[
https://issues.apache.org/jira/browse/SSHD-776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16191060#comment-16191060
]
Goldstein Lyor commented on SSHD-776:
-------------------------------------
I will look into it when I have some free time - so be patient as it may take
some time. Meanwhile, I have a few questions:
{quote}
>From out investigation it seems that when SSH_MSG_CHANNEL_EOF has been
>received (or processed), that channel has already being destroyed
{quote}
So there is clearly a violation of the SSH protocol - are you suggesting the
the code should ignore such violations ? There are serious repercussions to
such a choice - especially for a protocol like SSH that is a symbol of secure
connectivity. In any case, I believe that the code is written in an extensible
manner so you can write your own private extension and deal with this case (and
if not, let me know and I'll make it extensible) - but I doubt we want to make
this part of the regular code base. That being said, if you do decide to write
an extension, please publish it - we can include it as a *contribution* (see
{{sshd-contrib}}).
{quote}
After that exception, the SSH pipe does not manage any other message from the
remote endpoint (like managing the SSH_MSG_IGNORE that we sent to let the
connection alive, so that the connection expires for idle timeout).
{quote}
It would seem that there is a misconception about SSH and its participating
entities. I suggest you read the (quite a few) RFCs on it (they are listed in
the project's GIT home page), but here is a quick explanation that I deem
necessary in view of the above remark:
SSH makes a distinction between a connection, a session and a channel. Each of
them has different *semantic meaning*, role, capabilities, etc... It is
therefore crucial that you are *exact* in your terminology - what is it that
you are using ? What is being closed etc...
As far as the {{SSH_MSG_IGNORE}} message that you mention - it is a connection
level message, and cannot be used to keep the session or channel alive.
Furthermore, I am troubled by the fact that you are generating and sending such
messages in order to keep alive the SSH connection/channel/session - there are
other standard ways by which this is done for you already in the code - please
read the project's [gituhb home README|https://github.com/apache/mina-sshd/] -
specifically the part about {{keepalive@*}}
In regard to your code opening and closing channels - why aren't you using port
forwarding ?
> SSHD local port forwarding close session unexpectedly
> -----------------------------------------------------
>
> Key: SSHD-776
> URL: https://issues.apache.org/jira/browse/SSHD-776
> Project: MINA SSHD
> Issue Type: Bug
> Affects Versions: 1.6.0
> Reporter: Fulvio Cavarretta
> Priority: Blocker
> Attachments: dmzagent.trc, dmzagent.trc.2
>
>
> Apache SSHD used in local port forwarding mode.
> A client is connecting to a remote FTP server through Apache SSHD via a
> custom software.
> When a new logical channel inside a single SSHD session get an IO error (e.g.
> the remote destination close the connection suddenly, the whole session is
> shut down causing all other logical channel to be closed (see line 8861of
> attached trace file).
> It seems like the _exceptionCaught_ mathod should not be called in this case
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)