MINA SSHD
  1. MINA SSHD
  2. SSHD-258

[regression] binary input to exec channel is broken in 0.9.0 worked up to 0.8.0

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Duplicate
    • Affects Version/s: 0.9.0
    • Fix Version/s: None
    • Labels:
    • Environment:
      attached test case, server is openssh

      openssh-server-6.2p2-5.fc19.x86_64

      Description

      0.9.0 output:

      Oct 21, 2013 1:27:10 AM org.apache.sshd.client.channel.AbstractClientChannel internalOpen
      INFO: Send SSH_MSG_CHANNEL_OPEN on channel 101
      Oct 21, 2013 1:27:10 AM org.apache.sshd.client.channel.ChannelExec doOpen
      INFO: Send SSH_MSG_CHANNEL_REQUEST exec
      Oct 21, 2013 1:27:11 AM org.apache.sshd.client.session.ClientSessionImpl doHandleMessage
      INFO: Received SSH_MSG_DISCONNECT (reason=2, msg=Packet corrupt)
      Oct 21, 2013 1:27:11 AM org.apache.sshd.common.session.AbstractSession$1IoSessionCloser operationComplete
      INFO: Session root@/10.35.0.72:22 closed

      Notice the "Packet corrupt"

      0.8.0 output:

      Oct 21, 2013 1:26:16 AM org.apache.sshd.client.channel.AbstractClientChannel internalOpen
      INFO: Send SSH_MSG_CHANNEL_OPEN on channel 0
      Oct 21, 2013 1:26:16 AM org.apache.sshd.client.channel.ChannelExec doOpen
      INFO: Send SSH_MSG_CHANNEL_REQUEST exec
      Oct 21, 2013 1:26:27 AM org.apache.sshd.client.channel.AbstractClientChannel handleRequest
      INFO: Received SSH_MSG_CHANNEL_REQUEST on channel 0
      Oct 21, 2013 1:26:27 AM org.apache.sshd.common.session.AbstractSession$1IoSessionCloser operationComplete
      INFO: Session root@/10.35.0.72:22 closed

      1. SSHTest.java
        0.9 kB
        Alon Bar-Lev

        Issue Links

          Activity

          Alon Bar-Lev created issue -
          Hide
          Alon Bar-Lev added a comment -

          test case

          Show
          Alon Bar-Lev added a comment - test case
          Alon Bar-Lev made changes -
          Field Original Value New Value
          Attachment SSHTest.java [ 12609346 ]
          Hide
          Alon Bar-Lev added a comment -

          I marked it critical as fedora put this package in its updates, so applications that uses the system provided version are broken.

          Show
          Alon Bar-Lev added a comment - I marked it critical as fedora put this package in its updates, so applications that uses the system provided version are broken.
          Hide
          Alon Bar-Lev added a comment -

          Hi,

          I just want to know if there is a chance for someone to look at it soon and maybe provide a patch or if we should downgrade to 0.8.0.

          Thanks!

          Show
          Alon Bar-Lev added a comment - Hi, I just want to know if there is a chance for someone to look at it soon and maybe provide a patch or if we should downgrade to 0.8.0. Thanks!
          Hide
          Alon Bar-Lev added a comment -

          Anyone?

          Show
          Alon Bar-Lev added a comment - Anyone?
          Hide
          Guillaume Nodet added a comment -

          Sorry for the delay, I'll have a look at it asap.

          Show
          Guillaume Nodet added a comment - Sorry for the delay, I'll have a look at it asap.
          Hide
          Alon Bar-Lev added a comment -

          Hi,
          Any news?
          Thanks,

          Show
          Alon Bar-Lev added a comment - Hi, Any news? Thanks,
          Guillaume Nodet made changes -
          Assignee Guillaume Nodet [ gnt ]
          Hide
          Guillaume Nodet added a comment -

          I've tried to reproduce the issue with no success:

          Your code running with sshd 0.9.0:

          2014-01-24 15:13:36,645 | INFO  | main             | SecurityUtils                    | g.apache.sshd.common.util.SecurityUtils$BouncyCastleRegistration   94 | Trying to register BouncyCastle as a JCE provider
          2014-01-24 15:13:37,059 | INFO  | main             | SecurityUtils                    | g.apache.sshd.common.util.SecurityUtils$BouncyCastleRegistration   98 | Registration succeeded
          2014-01-24 15:13:37,163 | INFO  | pool-2-thread-1  | ClientSessionImpl                | org.apache.sshd.client.session.ClientSessionImpl                   86 | Session created...
          2014-01-24 15:13:37,172 | INFO  | pool-2-thread-1  | ClientSessionImpl                | org.apache.sshd.client.session.ClientSessionImpl                  515 | Server version string: SSH-2.0-OpenSSH_6.2
          2014-01-24 15:13:37,173 | INFO  | pool-2-thread-1  | ClientSessionImpl                | org.apache.sshd.client.session.ClientSessionImpl                  329 | Received SSH_MSG_KEXINIT
          2014-01-24 15:13:37,213 | INFO  | pool-2-thread-1  | DHG14                            | org.apache.sshd.client.kex.AbstractDHGClient                       78 | Send SSH_MSG_KEXDH_INIT
          2014-01-24 15:13:37,222 | INFO  | pool-2-thread-2  | DHG14                            | org.apache.sshd.client.kex.AbstractDHGClient                       93 | Received SSH_MSG_KEXDH_REPLY
          2014-01-24 15:13:37,270 | WARN  | pool-2-thread-2  | AcceptAllServerKeyVerifier       | org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier      45 | Server at localhost/127.0.0.1:22 presented unverified key: 
          2014-01-24 15:13:37,270 | INFO  | pool-2-thread-2  | ClientSessionImpl                | org.apache.sshd.client.session.ClientSessionImpl                  349 | Received SSH_MSG_NEWKEYS
          2014-01-24 15:13:37,275 | INFO  | pool-2-thread-2  | ClientSessionImpl                | org.apache.sshd.client.session.ClientSessionImpl                  548 | Send SSH_MSG_SERVICE_REQUEST for ssh-userauth
          2014-01-24 15:13:37,277 | INFO  | main             | UserAuthKeyboardInteractive      | org.apache.sshd.client.auth.UserAuthKeyboardInteractive            46 | Send SSH_MSG_USERAUTH_REQUEST for password
          2014-01-24 15:13:37,288 | INFO  | pool-2-thread-5  | UserAuthKeyboardInteractive      | org.apache.sshd.client.auth.UserAuthKeyboardInteractive            57 | Received SSH_MSG_USERAUTH_INFO_REQUEST
          2014-01-24 15:13:37,289 | INFO  | pool-2-thread-5  | UserAuthKeyboardInteractive      | org.apache.sshd.client.auth.UserAuthKeyboardInteractive            63 | Received   
          2014-01-24 15:13:37,289 | INFO  | pool-2-thread-5  | UserAuthKeyboardInteractive      | org.apache.sshd.client.auth.UserAuthKeyboardInteractive            71 | Promt: Password:
          2014-01-24 15:13:37,289 | INFO  | pool-2-thread-5  | UserAuthKeyboardInteractive      | org.apache.sshd.client.auth.UserAuthKeyboardInteractive            72 | Echo: [false]
          2014-01-24 15:13:37,405 | INFO  | pool-2-thread-6  | UserAuthKeyboardInteractive      | org.apache.sshd.client.auth.UserAuthKeyboardInteractive            57 | Received SSH_MSG_USERAUTH_INFO_REQUEST
          2014-01-24 15:13:37,407 | INFO  | pool-2-thread-6  | UserAuthKeyboardInteractive      | org.apache.sshd.client.auth.UserAuthKeyboardInteractive            63 | Received   
          2014-01-24 15:13:37,407 | INFO  | pool-2-thread-6  | UserAuthKeyboardInteractive      | org.apache.sshd.client.auth.UserAuthKeyboardInteractive            71 | Promt: {}
          2014-01-24 15:13:37,407 | INFO  | pool-2-thread-6  | UserAuthKeyboardInteractive      | org.apache.sshd.client.auth.UserAuthKeyboardInteractive            72 | Echo: []
          2014-01-24 15:13:37,408 | INFO  | pool-2-thread-7  | UserAuthKeyboardInteractive      | org.apache.sshd.client.auth.UserAuthKeyboardInteractive            57 | Received SSH_MSG_USERAUTH_SUCCESS
          2014-01-24 15:13:37,418 | INFO  | main             | ChannelExec                      | org.apache.sshd.client.channel.AbstractClientChannel              186 | Send SSH_MSG_CHANNEL_OPEN on channel 101
          2014-01-24 15:13:37,425 | INFO  | pool-2-thread-9  | ChannelExec                      | org.apache.sshd.client.channel.ChannelExec                         43 | Send SSH_MSG_CHANNEL_REQUEST exec
          2014-01-24 15:13:37,509 | INFO  | pool-2-thread-8  | ChannelExec                      | org.apache.sshd.client.channel.AbstractClientChannel              254 | Received SSH_MSG_CHANNEL_REQUEST on channel 101
          2014-01-24 15:13:37,512 | INFO  | main             | ClientSessionImpl                | org.apache.sshd.common.session.AbstractSession$1IoSessionCloser   317 | Session gnodet@localhost/127.0.0.1:22 closed
          

          Same code running with current master:

          2014-01-24 15:15:42,063 | INFO  | main             | SecurityUtils                    | g.apache.sshd.common.util.SecurityUtils$BouncyCastleRegistration  107 | Trying to register BouncyCastle as a JCE provider
          2014-01-24 15:15:43,075 | INFO  | main             | SecurityUtils                    | g.apache.sshd.common.util.SecurityUtils$BouncyCastleRegistration  111 | Registration succeeded
          2014-01-24 15:15:43,162 | INFO  | pool-2-thread-1  | ClientSessionImpl                | org.apache.sshd.client.session.ClientSessionImpl                   86 | Session created...
          2014-01-24 15:15:43,170 | INFO  | pool-2-thread-1  | ClientSessionImpl                | org.apache.sshd.client.session.ClientSessionImpl                  511 | Server version string: SSH-2.0-OpenSSH_6.2
          2014-01-24 15:15:43,171 | INFO  | pool-2-thread-1  | ClientSessionImpl                | org.apache.sshd.client.session.ClientSessionImpl                  325 | Received SSH_MSG_KEXINIT
          2014-01-24 15:15:43,172 | INFO  | pool-2-thread-1  | ClientSessionImpl                | org.apache.sshd.common.session.AbstractSession                    980 | Kex: server->client aes128-ctr hmac-sha2-256 none
          2014-01-24 15:15:43,172 | INFO  | pool-2-thread-1  | ClientSessionImpl                | org.apache.sshd.common.session.AbstractSession                    984 | Kex: client->server aes128-ctr hmac-sha2-256 none
          2014-01-24 15:15:43,210 | INFO  | pool-2-thread-1  | DHG14                            | org.apache.sshd.client.kex.AbstractDHGClient                       80 | Send SSH_MSG_KEXDH_INIT
          2014-01-24 15:15:43,224 | INFO  | pool-2-thread-2  | DHG14                            | org.apache.sshd.client.kex.AbstractDHGClient                       95 | Received SSH_MSG_KEXDH_REPLY
          2014-01-24 15:15:43,300 | WARN  | pool-2-thread-2  | AcceptAllServerKeyVerifier       | org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier      45 | Server at localhost/127.0.0.1:22 presented unverified RSA key: 4e:e0:c2:98:78:b8:37:48:26:e6:94:b5:b5:a7:93:85
          2014-01-24 15:15:43,300 | INFO  | pool-2-thread-2  | ClientSessionImpl                | org.apache.sshd.client.session.ClientSessionImpl                  345 | Received SSH_MSG_NEWKEYS
          2014-01-24 15:15:43,311 | INFO  | pool-2-thread-2  | ClientSessionImpl                | org.apache.sshd.client.session.ClientSessionImpl                  544 | Send SSH_MSG_SERVICE_REQUEST for ssh-userauth
          2014-01-24 15:15:43,314 | INFO  | main             | UserAuthKeyboardInteractive      | org.apache.sshd.client.auth.UserAuthKeyboardInteractive            46 | Send SSH_MSG_USERAUTH_REQUEST for password
          2014-01-24 15:15:43,331 | INFO  | pool-2-thread-5  | UserAuthKeyboardInteractive      | org.apache.sshd.client.auth.UserAuthKeyboardInteractive            57 | Received SSH_MSG_USERAUTH_INFO_REQUEST
          2014-01-24 15:15:43,332 | INFO  | pool-2-thread-5  | UserAuthKeyboardInteractive      | org.apache.sshd.client.auth.UserAuthKeyboardInteractive            63 | Received   
          2014-01-24 15:15:43,332 | INFO  | pool-2-thread-5  | UserAuthKeyboardInteractive      | org.apache.sshd.client.auth.UserAuthKeyboardInteractive            71 | Promt: Password:
          2014-01-24 15:15:43,335 | INFO  | pool-2-thread-5  | UserAuthKeyboardInteractive      | org.apache.sshd.client.auth.UserAuthKeyboardInteractive            72 | Echo: [false]
          2014-01-24 15:15:43,497 | INFO  | pool-2-thread-6  | UserAuthKeyboardInteractive      | org.apache.sshd.client.auth.UserAuthKeyboardInteractive            57 | Received SSH_MSG_USERAUTH_INFO_REQUEST
          2014-01-24 15:15:43,497 | INFO  | pool-2-thread-6  | UserAuthKeyboardInteractive      | org.apache.sshd.client.auth.UserAuthKeyboardInteractive            63 | Received   
          2014-01-24 15:15:43,497 | INFO  | pool-2-thread-6  | UserAuthKeyboardInteractive      | org.apache.sshd.client.auth.UserAuthKeyboardInteractive            71 | Promt: {}
          2014-01-24 15:15:43,498 | INFO  | pool-2-thread-6  | UserAuthKeyboardInteractive      | org.apache.sshd.client.auth.UserAuthKeyboardInteractive            72 | Echo: []
          2014-01-24 15:15:43,499 | INFO  | pool-2-thread-7  | UserAuthKeyboardInteractive      | org.apache.sshd.client.auth.UserAuthKeyboardInteractive            57 | Received SSH_MSG_USERAUTH_SUCCESS
          2014-01-24 15:15:43,508 | INFO  | main             | ChannelExec                      | org.apache.sshd.client.channel.AbstractClientChannel              186 | Send SSH_MSG_CHANNEL_OPEN on channel 101
          2014-01-24 15:15:43,516 | INFO  | pool-2-thread-9  | ChannelExec                      | org.apache.sshd.client.channel.ChannelExec                         43 | Send SSH_MSG_CHANNEL_REQUEST exec
          2014-01-24 15:15:43,617 | INFO  | pool-2-thread-8  | ChannelExec                      | org.apache.sshd.client.channel.AbstractClientChannel              254 | Received SSH_MSG_CHANNEL_REQUEST exit-status on channel 101
          2014-01-24 15:15:43,620 | INFO  | main             | ClientSessionImpl                | org.apache.sshd.common.session.AbstractSession$1IoSessionCloser   334 | Session gnodet@localhost/127.0.0.1:22 closed
          

          In both cases, I end up with a file in /tmp/a with a size of 1048576 bytes.

          Show
          Guillaume Nodet added a comment - I've tried to reproduce the issue with no success: Your code running with sshd 0.9.0: 2014-01-24 15:13:36,645 | INFO | main | SecurityUtils | g.apache.sshd.common.util.SecurityUtils$BouncyCastleRegistration 94 | Trying to register BouncyCastle as a JCE provider 2014-01-24 15:13:37,059 | INFO | main | SecurityUtils | g.apache.sshd.common.util.SecurityUtils$BouncyCastleRegistration 98 | Registration succeeded 2014-01-24 15:13:37,163 | INFO | pool-2-thread-1 | ClientSessionImpl | org.apache.sshd.client.session.ClientSessionImpl 86 | Session created... 2014-01-24 15:13:37,172 | INFO | pool-2-thread-1 | ClientSessionImpl | org.apache.sshd.client.session.ClientSessionImpl 515 | Server version string: SSH-2.0-OpenSSH_6.2 2014-01-24 15:13:37,173 | INFO | pool-2-thread-1 | ClientSessionImpl | org.apache.sshd.client.session.ClientSessionImpl 329 | Received SSH_MSG_KEXINIT 2014-01-24 15:13:37,213 | INFO | pool-2-thread-1 | DHG14 | org.apache.sshd.client.kex.AbstractDHGClient 78 | Send SSH_MSG_KEXDH_INIT 2014-01-24 15:13:37,222 | INFO | pool-2-thread-2 | DHG14 | org.apache.sshd.client.kex.AbstractDHGClient 93 | Received SSH_MSG_KEXDH_REPLY 2014-01-24 15:13:37,270 | WARN | pool-2-thread-2 | AcceptAllServerKeyVerifier | org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier 45 | Server at localhost/127.0.0.1:22 presented unverified key: 2014-01-24 15:13:37,270 | INFO | pool-2-thread-2 | ClientSessionImpl | org.apache.sshd.client.session.ClientSessionImpl 349 | Received SSH_MSG_NEWKEYS 2014-01-24 15:13:37,275 | INFO | pool-2-thread-2 | ClientSessionImpl | org.apache.sshd.client.session.ClientSessionImpl 548 | Send SSH_MSG_SERVICE_REQUEST for ssh-userauth 2014-01-24 15:13:37,277 | INFO | main | UserAuthKeyboardInteractive | org.apache.sshd.client.auth.UserAuthKeyboardInteractive 46 | Send SSH_MSG_USERAUTH_REQUEST for password 2014-01-24 15:13:37,288 | INFO | pool-2-thread-5 | UserAuthKeyboardInteractive | org.apache.sshd.client.auth.UserAuthKeyboardInteractive 57 | Received SSH_MSG_USERAUTH_INFO_REQUEST 2014-01-24 15:13:37,289 | INFO | pool-2-thread-5 | UserAuthKeyboardInteractive | org.apache.sshd.client.auth.UserAuthKeyboardInteractive 63 | Received 2014-01-24 15:13:37,289 | INFO | pool-2-thread-5 | UserAuthKeyboardInteractive | org.apache.sshd.client.auth.UserAuthKeyboardInteractive 71 | Promt: Password: 2014-01-24 15:13:37,289 | INFO | pool-2-thread-5 | UserAuthKeyboardInteractive | org.apache.sshd.client.auth.UserAuthKeyboardInteractive 72 | Echo: [ false ] 2014-01-24 15:13:37,405 | INFO | pool-2-thread-6 | UserAuthKeyboardInteractive | org.apache.sshd.client.auth.UserAuthKeyboardInteractive 57 | Received SSH_MSG_USERAUTH_INFO_REQUEST 2014-01-24 15:13:37,407 | INFO | pool-2-thread-6 | UserAuthKeyboardInteractive | org.apache.sshd.client.auth.UserAuthKeyboardInteractive 63 | Received 2014-01-24 15:13:37,407 | INFO | pool-2-thread-6 | UserAuthKeyboardInteractive | org.apache.sshd.client.auth.UserAuthKeyboardInteractive 71 | Promt: {} 2014-01-24 15:13:37,407 | INFO | pool-2-thread-6 | UserAuthKeyboardInteractive | org.apache.sshd.client.auth.UserAuthKeyboardInteractive 72 | Echo: [] 2014-01-24 15:13:37,408 | INFO | pool-2-thread-7 | UserAuthKeyboardInteractive | org.apache.sshd.client.auth.UserAuthKeyboardInteractive 57 | Received SSH_MSG_USERAUTH_SUCCESS 2014-01-24 15:13:37,418 | INFO | main | ChannelExec | org.apache.sshd.client.channel.AbstractClientChannel 186 | Send SSH_MSG_CHANNEL_OPEN on channel 101 2014-01-24 15:13:37,425 | INFO | pool-2-thread-9 | ChannelExec | org.apache.sshd.client.channel.ChannelExec 43 | Send SSH_MSG_CHANNEL_REQUEST exec 2014-01-24 15:13:37,509 | INFO | pool-2-thread-8 | ChannelExec | org.apache.sshd.client.channel.AbstractClientChannel 254 | Received SSH_MSG_CHANNEL_REQUEST on channel 101 2014-01-24 15:13:37,512 | INFO | main | ClientSessionImpl | org.apache.sshd.common.session.AbstractSession$1IoSessionCloser 317 | Session gnodet@localhost/127.0.0.1:22 closed Same code running with current master: 2014-01-24 15:15:42,063 | INFO | main | SecurityUtils | g.apache.sshd.common.util.SecurityUtils$BouncyCastleRegistration 107 | Trying to register BouncyCastle as a JCE provider 2014-01-24 15:15:43,075 | INFO | main | SecurityUtils | g.apache.sshd.common.util.SecurityUtils$BouncyCastleRegistration 111 | Registration succeeded 2014-01-24 15:15:43,162 | INFO | pool-2-thread-1 | ClientSessionImpl | org.apache.sshd.client.session.ClientSessionImpl 86 | Session created... 2014-01-24 15:15:43,170 | INFO | pool-2-thread-1 | ClientSessionImpl | org.apache.sshd.client.session.ClientSessionImpl 511 | Server version string: SSH-2.0-OpenSSH_6.2 2014-01-24 15:15:43,171 | INFO | pool-2-thread-1 | ClientSessionImpl | org.apache.sshd.client.session.ClientSessionImpl 325 | Received SSH_MSG_KEXINIT 2014-01-24 15:15:43,172 | INFO | pool-2-thread-1 | ClientSessionImpl | org.apache.sshd.common.session.AbstractSession 980 | Kex: server->client aes128-ctr hmac-sha2-256 none 2014-01-24 15:15:43,172 | INFO | pool-2-thread-1 | ClientSessionImpl | org.apache.sshd.common.session.AbstractSession 984 | Kex: client->server aes128-ctr hmac-sha2-256 none 2014-01-24 15:15:43,210 | INFO | pool-2-thread-1 | DHG14 | org.apache.sshd.client.kex.AbstractDHGClient 80 | Send SSH_MSG_KEXDH_INIT 2014-01-24 15:15:43,224 | INFO | pool-2-thread-2 | DHG14 | org.apache.sshd.client.kex.AbstractDHGClient 95 | Received SSH_MSG_KEXDH_REPLY 2014-01-24 15:15:43,300 | WARN | pool-2-thread-2 | AcceptAllServerKeyVerifier | org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier 45 | Server at localhost/127.0.0.1:22 presented unverified RSA key: 4e:e0:c2:98:78:b8:37:48:26:e6:94:b5:b5:a7:93:85 2014-01-24 15:15:43,300 | INFO | pool-2-thread-2 | ClientSessionImpl | org.apache.sshd.client.session.ClientSessionImpl 345 | Received SSH_MSG_NEWKEYS 2014-01-24 15:15:43,311 | INFO | pool-2-thread-2 | ClientSessionImpl | org.apache.sshd.client.session.ClientSessionImpl 544 | Send SSH_MSG_SERVICE_REQUEST for ssh-userauth 2014-01-24 15:15:43,314 | INFO | main | UserAuthKeyboardInteractive | org.apache.sshd.client.auth.UserAuthKeyboardInteractive 46 | Send SSH_MSG_USERAUTH_REQUEST for password 2014-01-24 15:15:43,331 | INFO | pool-2-thread-5 | UserAuthKeyboardInteractive | org.apache.sshd.client.auth.UserAuthKeyboardInteractive 57 | Received SSH_MSG_USERAUTH_INFO_REQUEST 2014-01-24 15:15:43,332 | INFO | pool-2-thread-5 | UserAuthKeyboardInteractive | org.apache.sshd.client.auth.UserAuthKeyboardInteractive 63 | Received 2014-01-24 15:15:43,332 | INFO | pool-2-thread-5 | UserAuthKeyboardInteractive | org.apache.sshd.client.auth.UserAuthKeyboardInteractive 71 | Promt: Password: 2014-01-24 15:15:43,335 | INFO | pool-2-thread-5 | UserAuthKeyboardInteractive | org.apache.sshd.client.auth.UserAuthKeyboardInteractive 72 | Echo: [ false ] 2014-01-24 15:15:43,497 | INFO | pool-2-thread-6 | UserAuthKeyboardInteractive | org.apache.sshd.client.auth.UserAuthKeyboardInteractive 57 | Received SSH_MSG_USERAUTH_INFO_REQUEST 2014-01-24 15:15:43,497 | INFO | pool-2-thread-6 | UserAuthKeyboardInteractive | org.apache.sshd.client.auth.UserAuthKeyboardInteractive 63 | Received 2014-01-24 15:15:43,497 | INFO | pool-2-thread-6 | UserAuthKeyboardInteractive | org.apache.sshd.client.auth.UserAuthKeyboardInteractive 71 | Promt: {} 2014-01-24 15:15:43,498 | INFO | pool-2-thread-6 | UserAuthKeyboardInteractive | org.apache.sshd.client.auth.UserAuthKeyboardInteractive 72 | Echo: [] 2014-01-24 15:15:43,499 | INFO | pool-2-thread-7 | UserAuthKeyboardInteractive | org.apache.sshd.client.auth.UserAuthKeyboardInteractive 57 | Received SSH_MSG_USERAUTH_SUCCESS 2014-01-24 15:15:43,508 | INFO | main | ChannelExec | org.apache.sshd.client.channel.AbstractClientChannel 186 | Send SSH_MSG_CHANNEL_OPEN on channel 101 2014-01-24 15:15:43,516 | INFO | pool-2-thread-9 | ChannelExec | org.apache.sshd.client.channel.ChannelExec 43 | Send SSH_MSG_CHANNEL_REQUEST exec 2014-01-24 15:15:43,617 | INFO | pool-2-thread-8 | ChannelExec | org.apache.sshd.client.channel.AbstractClientChannel 254 | Received SSH_MSG_CHANNEL_REQUEST exit-status on channel 101 2014-01-24 15:15:43,620 | INFO | main | ClientSessionImpl | org.apache.sshd.common.session.AbstractSession$1IoSessionCloser 334 | Session gnodet@localhost/127.0.0.1:22 closed In both cases, I end up with a file in /tmp/a with a size of 1048576 bytes.
          Hide
          Guillaume Nodet added a comment -

          Please reopen if you can reproduce it with either 0.9.0 or master.
          In such a case, if you could set up a sshd server I can connect to for testing, that would be awesome.

          Show
          Guillaume Nodet added a comment - Please reopen if you can reproduce it with either 0.9.0 or master. In such a case, if you could set up a sshd server I can connect to for testing, that would be awesome.
          Guillaume Nodet made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Cannot Reproduce [ 5 ]
          Hide
          Alon Bar-Lev added a comment -

          I can 100% reproduce that with 0.9.0 (Packet corrupt):

          2 [main] INFO org.apache.sshd.common.util.SecurityUtils - BouncyCastle not registered, using the default JCE provider
          336 [pool-2-thread-1] INFO org.apache.sshd.client.session.ClientSessionImpl - Session created...
          512 [pool-2-thread-2] INFO org.apache.sshd.client.session.ClientSessionImpl - Server version string: SSH-2.0-OpenSSH_6.2
          682 [pool-2-thread-4] INFO org.apache.sshd.client.session.ClientSessionImpl - Received SSH_MSG_KEXINIT
          712 [pool-2-thread-4] INFO org.apache.sshd.client.kex.DHG1 - Send SSH_MSG_KEXDH_INIT
          932 [pool-2-thread-5] INFO org.apache.sshd.client.kex.DHG1 - Received SSH_MSG_KEXDH_REPLY
          950 [pool-2-thread-5] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /10.35.0.72:22 presented unverified key:
          950 [pool-2-thread-5] INFO org.apache.sshd.client.session.ClientSessionImpl - Received SSH_MSG_NEWKEYS
          954 [pool-2-thread-5] INFO org.apache.sshd.client.session.ClientSessionImpl - Send SSH_MSG_SERVICE_REQUEST for ssh-userauth
          1362 [main] INFO org.apache.sshd.client.auth.UserAuthPassword - Send SSH_MSG_USERAUTH_REQUEST for password
          1561 [pool-2-thread-3] INFO org.apache.sshd.client.auth.UserAuthPassword - Received SSH_MSG_USERAUTH_SUCCESS
          1569 [main] INFO org.apache.sshd.client.channel.ChannelExec - Send SSH_MSG_CHANNEL_OPEN on channel 101
          1739 [pool-2-thread-5] INFO org.apache.sshd.client.channel.ChannelExec - Send SSH_MSG_CHANNEL_REQUEST exec
          2550 [pool-2-thread-1] INFO org.apache.sshd.client.session.ClientSessionImpl - Received SSH_MSG_DISCONNECT (reason=2, msg=Packet corrupt)
          2552 [pool-2-thread-1] INFO org.apache.sshd.client.session.ClientSessionImpl - Session root@/10.35.0.72:22 closed

          Cannot reproduce that using current master using this test case, I will try to use master for the full blown application.

          Show
          Alon Bar-Lev added a comment - I can 100% reproduce that with 0.9.0 (Packet corrupt): 2 [main] INFO org.apache.sshd.common.util.SecurityUtils - BouncyCastle not registered, using the default JCE provider 336 [pool-2-thread-1] INFO org.apache.sshd.client.session.ClientSessionImpl - Session created... 512 [pool-2-thread-2] INFO org.apache.sshd.client.session.ClientSessionImpl - Server version string: SSH-2.0-OpenSSH_6.2 682 [pool-2-thread-4] INFO org.apache.sshd.client.session.ClientSessionImpl - Received SSH_MSG_KEXINIT 712 [pool-2-thread-4] INFO org.apache.sshd.client.kex.DHG1 - Send SSH_MSG_KEXDH_INIT 932 [pool-2-thread-5] INFO org.apache.sshd.client.kex.DHG1 - Received SSH_MSG_KEXDH_REPLY 950 [pool-2-thread-5] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /10.35.0.72:22 presented unverified key: 950 [pool-2-thread-5] INFO org.apache.sshd.client.session.ClientSessionImpl - Received SSH_MSG_NEWKEYS 954 [pool-2-thread-5] INFO org.apache.sshd.client.session.ClientSessionImpl - Send SSH_MSG_SERVICE_REQUEST for ssh-userauth 1362 [main] INFO org.apache.sshd.client.auth.UserAuthPassword - Send SSH_MSG_USERAUTH_REQUEST for password 1561 [pool-2-thread-3] INFO org.apache.sshd.client.auth.UserAuthPassword - Received SSH_MSG_USERAUTH_SUCCESS 1569 [main] INFO org.apache.sshd.client.channel.ChannelExec - Send SSH_MSG_CHANNEL_OPEN on channel 101 1739 [pool-2-thread-5] INFO org.apache.sshd.client.channel.ChannelExec - Send SSH_MSG_CHANNEL_REQUEST exec 2550 [pool-2-thread-1] INFO org.apache.sshd.client.session.ClientSessionImpl - Received SSH_MSG_DISCONNECT (reason=2, msg=Packet corrupt) 2552 [pool-2-thread-1] INFO org.apache.sshd.client.session.ClientSessionImpl - Session root@/10.35.0.72:22 closed Cannot reproduce that using current master using this test case, I will try to use master for the full blown application.
          Hide
          Alon Bar-Lev added a comment -

          bisect to:

          commit 74946f1b68ffdd207af5b6102693030e39693340
          Author: Guillaume Nodet <gnodet@apache.org>
          Date: Tue Dec 3 20:19:34 2013 +0100

          SSHD-252 SshException MAC Error in org.apache.sshd.common.session.AbstractSession.decode when using Nio2ServiceFactory

          reopening, if this is not intentional fix, maybe there is some other work.

          Show
          Alon Bar-Lev added a comment - bisect to: commit 74946f1b68ffdd207af5b6102693030e39693340 Author: Guillaume Nodet <gnodet@apache.org> Date: Tue Dec 3 20:19:34 2013 +0100 SSHD-252 SshException MAC Error in org.apache.sshd.common.session.AbstractSession.decode when using Nio2ServiceFactory reopening, if this is not intentional fix, maybe there is some other work.
          Alon Bar-Lev made changes -
          Resolution Cannot Reproduce [ 5 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Hide
          Alon Bar-Lev added a comment -

          BTW: does it mean that mina-core is no longer required for apache-sshd runtime?

          Show
          Alon Bar-Lev added a comment - BTW: does it mean that mina-core is no longer required for apache-sshd runtime?
          Hide
          Alon Bar-Lev added a comment -

          I can confirm that master is passing all tests and works without mina-core in classpath.

          If no more action items please mark dup of SSHD-252.

          Show
          Alon Bar-Lev added a comment - I can confirm that master is passing all tests and works without mina-core in classpath. If no more action items please mark dup of SSHD-252 .
          Guillaume Nodet made changes -
          Link This issue duplicates SSHD-252 [ SSHD-252 ]
          Guillaume Nodet made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Fix Version/s 0.8.0 [ 12321700 ]
          Resolution Duplicate [ 3 ]
          Hide
          Guillaume Nodet added a comment -

          Yes, mina-core is optional since 0.9.0 when running on JDK 7.

          Show
          Guillaume Nodet added a comment - Yes, mina-core is optional since 0.9.0 when running on JDK 7.
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          95d 14h 51m 1 Guillaume Nodet 24/Jan/14 14:19
          Resolved Resolved Reopened Reopened
          4h 11m 1 Alon Bar-Lev 24/Jan/14 18:31
          Reopened Reopened Resolved Resolved
          19h 11m 1 Guillaume Nodet 25/Jan/14 13:42

            People

            • Assignee:
              Guillaume Nodet
              Reporter:
              Alon Bar-Lev
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development