mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Goldstein Lyor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SSHD-614) SCP upload fails with dropbear server (aka server with paket size limitation)
Date Tue, 15 Dec 2015 13:35:46 GMT

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

Goldstein Lyor commented on SSHD-614:
-------------------------------------

I cannot reproduce your problem:
{quote}
$ dropbear -V
	Dropbear v2015.71

$ ./dropbear -E -F -p 2222 -v -r ./dropbear_rsa_host_key -r ./dropbear_dss_host_key -r ./dropbear_ecdsa_host_key
{quote}
Get the latest version (including SSHD-615) and then you can debug in the IDE the _ScpCommandMain_
test application (i.e., invoke its _main_) or look at _ScpCommand#main_ and see how the code
works. I have tried it with files ranging from a few KB to ~220MB (see below) and everything
succeeded - both upload and download:
{quote}
Dec 15, 2015 2:46:15 PM org.apache.sshd.common.util.SecurityUtils$BouncyCastleRegistration
call
INFO: Trying to register BouncyCastle as a JCE provider
Dec 15, 2015 2:46:15 PM org.apache.sshd.common.util.SecurityUtils$BouncyCastleRegistration
call
INFO: Registration succeeded
Dec 15, 2015 2:46:16 PM org.apache.sshd.client.keyverifier.StaticServerKeyVerifier handleAcceptance
WARNING: Server at /XXXX:2222 presented unverified EC key: SHA256:dFKYViAe1WEsPbj6BlWctoKoyGPVOp6NDtFaYBkjd0U
	startFileEvent\[SEND\] some-big-file length=218497024 \[OWNER_READ, OWNER_WRITE, GROUP_READ,
GROUP_WRITE, OTHERS_READ, OTHERS_WRITE\]
	endFileEvent\[SEND\] some-big-file length=218497024 \[OWNER_READ, OWNER_WRITE, GROUP_READ,
GROUP_WRITE, OTHERS_READ, OTHERS_WRITE\]
{quote}
This is the upload example (since this what you tried), but I did the same for download and
it works...

> SCP upload fails with dropbear server (aka server with paket size limitation)
> -----------------------------------------------------------------------------
>
>                 Key: SSHD-614
>                 URL: https://issues.apache.org/jira/browse/SSHD-614
>             Project: MINA SSHD
>          Issue Type: Bug
>            Reporter: Oliver Stöneberg
>            Priority: Minor
>         Attachments: dropbear_not_working.log, openssh_working.log
>
>
> When trying to upload a file via SCP to a server running dropbear I get the following
error:
> java.io.EOFException: readAck - EOF before ACK -  
> at org.apache.sshd.common.scp.ScpHelper.readAck() in ScpHelper.java:703. 
> at org.apache.sshd.common.scp.ScpHelper.sendStream() in ScpHelper.java:539. 
> at org.apache.sshd.client.scp.DefaultScpClient.upload() in DefaultScpClient.java:104.

> at org.apache.sshd.client.scp.AbstractScpClient.upload() in AbstractScpClient.java:201.

> The main difference between dropbear and OpenSSH I have encountered is that dropbear
has a paket size limitation in place by default. That's the reason in the first place why
I even need to upload files via SCP since using trying to execute bigger scripts via an exec
channel it will fail. I attached logs from the system that fails and another system. The main
difference seems to be this:
> working (OpenSSH):
> DEBUG [sshd-SshClient[51a8313b]-nio2-thread-9] (AbstractConnectionService.java:236) channelOpenConfirmation(ChannelExec[id=0,
recipient=-1]-ClientSessionImpl[sshtest@XXXXXXXXX.XXXX.XXX/XX.XX.XX.XXX:22]) Received SSH_MSG_CHANNEL_OPEN_CONFIRMATION
recipient=
> DEBUG [sshd-SshClient[51a8313b]-nio2-thread-9] (AbstractChannel.java:121) setRecipient(ChannelExec[id=0,
recipient=-1]-ClientSessionImpl[sshtest@XXXXXXXXX.XXXX.XXX/XX.XX.XX.XXX:22]) recipient=0
> DEBUG [sshd-SshClient[51a8313b]-nio2-thread-9] (Window.java:122) init(ChannelExec[id=0,
recipient=0]-ClientSessionImpl[sshtest@XXXXXXXXX.XXXX.XXX/XX.XX.XX.XXX:22]: client remote
window) size=0, max.=0, packet=32768
> DEBUG [sshd-SshClient[51a8313b]-nio2-thread-9] (ChannelExec.java:47) doOpen(ChannelExec[id=0,
recipient=0]-ClientSessionImpl[sshtest@XXXXXXXXX.XXXX.XXX/XX.XX.XX.XXX:22]) send SSH_MSG_CHANNEL_REQUEST
exec command=scp -p -t -- /tmp/XXXXX_script.sh
> not working (dropbear):
> DEBUG [sshd-SshClient[11389053]-nio2-thread-7] (AbstractConnectionService.java:236) channelOpenConfirmation(ChannelExec[id=0,
recipient=-1]-ClientSessionImpl[test@/XX.XX.XX.XXX:44]) Received SSH_MSG_CHANNEL_OPEN_CONFIRMATION
recipient=
> DEBUG [sshd-SshClient[11389053]-nio2-thread-7] (AbstractChannel.java:121) setRecipient(ChannelExec[id=0,
recipient=-1]-ClientSessionImpl[test@/XX.XX.XX.XXX:44]) recipient=0
> DEBUG [sshd-SshClient[11389053]-nio2-thread-7] (Window.java:122) init(ChannelExec[id=0,
recipient=0]-ClientSessionImpl[test@/XX.XX.XX.XXX:44]: client remote window) size=24576, max.=24576,
packet=32759
> DEBUG [sshd-SshClient[11389053]-nio2-thread-7] (ChannelExec.java:47) doOpen(ChannelExec[id=0,
recipient=0]-ClientSessionImpl[test@/XX.XX.XX.XXX:44]) send SSH_MSG_CHANNEL_REQUEST exec command=scp
-p -t -- /tmp/XXXXX_script.sh
> As you can see that's a min/max set for the not working dropbear.
> There's also two typos in this log message (the additional whitespace at "client local"
and the period at "max":
> DEBUG [forceDeviceActionAsync] (Window.java:122) init(ChannelExec[id=0, recipient=-1]-ClientSessionImpl[test@/10.48.43.214:44]:
client local  window) size=2097152, max.=2097152, packet=32768
> I am using the latest version of master.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message