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

Guillaume Nodet commented on SSHD-258:
--------------------------------------

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

Your code running with sshd 0.9.0:
{code}
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
{code}

Same code running with current master:
{code}
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
{code}

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

> [regression] binary input to exec channel is broken in 0.9.0 worked up to 
> 0.8.0
> -------------------------------------------------------------------------------
>
>                 Key: SSHD-258
>                 URL: https://issues.apache.org/jira/browse/SSHD-258
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>         Environment: attached test case, server is openssh
> openssh-server-6.2p2-5.fc19.x86_64
>            Reporter: Alon Bar-Lev
>            Assignee: Guillaume Nodet
>            Priority: Critical
>              Labels: regression
>             Fix For: 0.8.0
>
>         Attachments: SSHTest.java
>
>
> 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
> ---



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to