You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2013/12/03 22:06:39 UTC

[jira] [Updated] (SSHD-256) Consistent handling of SSH_MSG_CHANNEL_REQUEST messages

     [ https://issues.apache.org/jira/browse/SSHD-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated SSHD-256:
---------------------------------

    Fix Version/s: 0.10.0
         Assignee: Guillaume Nodet
          Summary: Consistent handling of SSH_MSG_CHANNEL_REQUEST messages  (was: SSH_MSG_CHANNEL_REQUEST for Putty handled incorrectly)

> Consistent handling of SSH_MSG_CHANNEL_REQUEST messages
> -------------------------------------------------------
>
>                 Key: SSHD-256
>                 URL: https://issues.apache.org/jira/browse/SSHD-256
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 0.7.0, 0.8.0, 0.9.0
>            Reporter: Michael Heemskerk
>            Assignee: Guillaume Nodet
>             Fix For: 0.10.0
>
>         Attachments: 0001-Consistently-send-replies-to-channel-requests.patch
>
>
> Symptom:
> SSH connection is kept open after the command completes when using Putty, Plink or TortoisePlink, or rather Putty does not finish.
> See:
> * https://code.google.com/p/tortoisegit/issues/detail?id=1880
> * https://jira.atlassian.com/browse/STASH-3824
> Cause:
> ChannelSession has special handling for SSH_MSG_CHANNEL_REQUEST messages that are sent by Putty:
>         if (type != null && type.endsWith("@putty.projects.tartarus.org")) {
>             // Ignore but accept, more doc at
>             // http://tartarus.org/~simon/putty-snapshots/htmldoc/AppendixF.html
>             return true;
>         }
> There are really two problems with this workaround that was introduced in SSHD-77:
> 1) This code ignores the "want reply" flag on the field and simply ignores the request. According to the SSH protocol specification, the server MUST send back a reply (success or failure) if the "want reply" flag is set to true.
> 2) Putty _intentionally_ sends an invalid request and _expects_ to receive a SSH_MSG_CHANNEL_FAILURE response (see http://tartarus.org/~simon/putty-snapshots/htmldoc/AppendixF.html), which is the default behaviour of ChannelSession.
> I don't know whether changes in Putty or changes in MinaSSHD have made the workaround obsolete, but it is obsolete. I've verified that without the bit of code I quoted above, the Putty terminates normally.



--
This message was sent by Atlassian JIRA
(v6.1#6144)