[jira] [Commented] (SSHD-927) SFTP put fails terminating the connection if the remote file exists

2019-06-28 Thread Goldstein Lyor (JIRA)


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

Goldstein Lyor commented on SSHD-927:
-

BTW, if I am right about the version issue, then there is a way to make SSHD 
code declare it supports only version 3

> SFTP put fails terminating the connection if the remote file exists
> ---
>
> Key: SSHD-927
> URL: https://issues.apache.org/jira/browse/SSHD-927
> Project: MINA SSHD
>  Issue Type: Bug
>Affects Versions: 2.1.0, 2.2.0
> Environment: Java:
> C:\Program Files\Java\jdk1.8.0_201\bin>java -version
> java version "1.8.0_201"
> Java(TM) SE Runtime Environment (build 1.8.0_201-b26)
> Java HotSpot(TM) 64-Bit Server VM (build 25.201-b26, mixed mode)
> Apache SSHD : 2.1.0
> C:\temp>sftp2 --version
> sftp2: Tectia Client 6.4.14 on x86-pc-windows
> Build: 26
> Product: Tectia Client
> License type: commercial
> Copyright (C) SSH Communications Security Corporation.
> This software is protected by international copyright laws.
> All rights reserved.
> This product includes software developed by the OpenSSL Project
> for use in the OpenSSL Toolkit. (http://www.openssl.org/)
> SFT API: 2.0.3 (build 6.4.14.26)
>Reporter: Logan
>Assignee: Goldstein Lyor
>Priority: Major
> Attachments: sshd.log, thread-callstack.txt
>
>
> Sftp put fails if the file already exists on the sftp server, terminating the 
> sfp session immediately.Below is the simple configuration to reproduce
>  
> {code:java}
> SshServer sshd = SshServer.setUpDefaultServer();
> sshd.setPort();
> sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider());
> sshd.setSubsystemFactories(Arrays.asList(new SftpSubsystemFactory()));
> sshd.setFileSystemFactory(new VirtualFileSystemFactory(new 
> File("C:/temp").toPath()));
> sshd.setPasswordAuthenticator(AcceptAllPasswordAuthenticator.INSTANCE);
> sshd.start();
> {code}
>  
> {noformat}
> C:\temp>sftp2 test@localhost#
> Host key for the host "localhost#" not found from database.
> The fingerprint of the host public key is:
> Babble: "xodec-damen-ripeg-hehuh-venep-pebys-zureg-rynit-mypiz-byheh-zixax"
> RFC4716: "1d:4f:c2:a4:fe:58:93:61:fe:44:69:26:f2:41:34:f7"
> You can get a public key's fingerprint by running
> % ssh-keygen-g3 -F publickey.pub
> on the key file.
> Please select how you want to proceed.
>  cancel) Cancel the connection.
>  once) Proceed with the connection but do not save the key.
>  save) Proceed with the connection and save the key for future use.
> Please select one (cancel, once, save): once
> test@localhost#'s password:
> Remote system type is POSIX.
> sftp> put ndp46-kb4483451-x64_41ba9b8a814351a318e78e4e1c02adc7e9fff67a.exe
> Error: Connection lost.
> {noformat}
> Upon Debugging I found the SftpSystem is terminated because the file channel 
> received close command ( see attached )
> Added event listener to see reading and read method are called but no 
> writing/write methods are never called.
>  
> This can reproducible with v2.2.0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[jira] [Commented] (SSHD-927) SFTP put fails terminating the connection if the remote file exists

2019-06-27 Thread Goldstein Lyor (JIRA)


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

Goldstein Lyor commented on SSHD-927:
-

{quote}
Thank you. I'll look if we could support you guys.
{quote}
Always glad to have contributions from the community :)
{quote}
Perhaps OpenSSH server has this feature built-in?
{quote}
Easily verified - you can connect to it using SSHD SFTP command line client and 
ask to see the supported extensions...

> SFTP put fails terminating the connection if the remote file exists
> ---
>
> Key: SSHD-927
> URL: https://issues.apache.org/jira/browse/SSHD-927
> Project: MINA SSHD
>  Issue Type: Bug
>Affects Versions: 2.1.0, 2.2.0
> Environment: Java:
> C:\Program Files\Java\jdk1.8.0_201\bin>java -version
> java version "1.8.0_201"
> Java(TM) SE Runtime Environment (build 1.8.0_201-b26)
> Java HotSpot(TM) 64-Bit Server VM (build 25.201-b26, mixed mode)
> Apache SSHD : 2.1.0
> C:\temp>sftp2 --version
> sftp2: Tectia Client 6.4.14 on x86-pc-windows
> Build: 26
> Product: Tectia Client
> License type: commercial
> Copyright (C) SSH Communications Security Corporation.
> This software is protected by international copyright laws.
> All rights reserved.
> This product includes software developed by the OpenSSL Project
> for use in the OpenSSL Toolkit. (http://www.openssl.org/)
> SFT API: 2.0.3 (build 6.4.14.26)
>Reporter: Logan
>Assignee: Goldstein Lyor
>Priority: Major
> Attachments: sshd.log, thread-callstack.txt
>
>
> Sftp put fails if the file already exists on the sftp server, terminating the 
> sfp session immediately.Below is the simple configuration to reproduce
>  
> {code:java}
> SshServer sshd = SshServer.setUpDefaultServer();
> sshd.setPort();
> sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider());
> sshd.setSubsystemFactories(Arrays.asList(new SftpSubsystemFactory()));
> sshd.setFileSystemFactory(new VirtualFileSystemFactory(new 
> File("C:/temp").toPath()));
> sshd.setPasswordAuthenticator(AcceptAllPasswordAuthenticator.INSTANCE);
> sshd.start();
> {code}
>  
> {noformat}
> C:\temp>sftp2 test@localhost#
> Host key for the host "localhost#" not found from database.
> The fingerprint of the host public key is:
> Babble: "xodec-damen-ripeg-hehuh-venep-pebys-zureg-rynit-mypiz-byheh-zixax"
> RFC4716: "1d:4f:c2:a4:fe:58:93:61:fe:44:69:26:f2:41:34:f7"
> You can get a public key's fingerprint by running
> % ssh-keygen-g3 -F publickey.pub
> on the key file.
> Please select how you want to proceed.
>  cancel) Cancel the connection.
>  once) Proceed with the connection but do not save the key.
>  save) Proceed with the connection and save the key for future use.
> Please select one (cancel, once, save): once
> test@localhost#'s password:
> Remote system type is POSIX.
> sftp> put ndp46-kb4483451-x64_41ba9b8a814351a318e78e4e1c02adc7e9fff67a.exe
> Error: Connection lost.
> {noformat}
> Upon Debugging I found the SftpSystem is terminated because the file channel 
> received close command ( see attached )
> Added event listener to see reading and read method are called but no 
> writing/write methods are never called.
>  
> This can reproducible with v2.2.0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[jira] [Commented] (SSHD-927) SFTP put fails terminating the connection if the remote file exists

2019-06-27 Thread Logan (JIRA)


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

Logan commented on SSHD-927:


Thank you. I'll look if we could support you guys.

Also I checked connecting to openssh server running on RHEL 7 and using the 
same client without turning off checksum option and it works without issue. 
Perhaps OpenSSH server has this feature built-in?  OpenSSH server version is 
{noformat}
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017{noformat}

> SFTP put fails terminating the connection if the remote file exists
> ---
>
> Key: SSHD-927
> URL: https://issues.apache.org/jira/browse/SSHD-927
> Project: MINA SSHD
>  Issue Type: Bug
>Affects Versions: 2.1.0, 2.2.0
> Environment: Java:
> C:\Program Files\Java\jdk1.8.0_201\bin>java -version
> java version "1.8.0_201"
> Java(TM) SE Runtime Environment (build 1.8.0_201-b26)
> Java HotSpot(TM) 64-Bit Server VM (build 25.201-b26, mixed mode)
> Apache SSHD : 2.1.0
> C:\temp>sftp2 --version
> sftp2: Tectia Client 6.4.14 on x86-pc-windows
> Build: 26
> Product: Tectia Client
> License type: commercial
> Copyright (C) SSH Communications Security Corporation.
> This software is protected by international copyright laws.
> All rights reserved.
> This product includes software developed by the OpenSSL Project
> for use in the OpenSSL Toolkit. (http://www.openssl.org/)
> SFT API: 2.0.3 (build 6.4.14.26)
>Reporter: Logan
>Assignee: Goldstein Lyor
>Priority: Major
> Attachments: sshd.log, thread-callstack.txt
>
>
> Sftp put fails if the file already exists on the sftp server, terminating the 
> sfp session immediately.Below is the simple configuration to reproduce
>  
> {code:java}
> SshServer sshd = SshServer.setUpDefaultServer();
> sshd.setPort();
> sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider());
> sshd.setSubsystemFactories(Arrays.asList(new SftpSubsystemFactory()));
> sshd.setFileSystemFactory(new VirtualFileSystemFactory(new 
> File("C:/temp").toPath()));
> sshd.setPasswordAuthenticator(AcceptAllPasswordAuthenticator.INSTANCE);
> sshd.start();
> {code}
>  
> {noformat}
> C:\temp>sftp2 test@localhost#
> Host key for the host "localhost#" not found from database.
> The fingerprint of the host public key is:
> Babble: "xodec-damen-ripeg-hehuh-venep-pebys-zureg-rynit-mypiz-byheh-zixax"
> RFC4716: "1d:4f:c2:a4:fe:58:93:61:fe:44:69:26:f2:41:34:f7"
> You can get a public key's fingerprint by running
> % ssh-keygen-g3 -F publickey.pub
> on the key file.
> Please select how you want to proceed.
>  cancel) Cancel the connection.
>  once) Proceed with the connection but do not save the key.
>  save) Proceed with the connection and save the key for future use.
> Please select one (cancel, once, save): once
> test@localhost#'s password:
> Remote system type is POSIX.
> sftp> put ndp46-kb4483451-x64_41ba9b8a814351a318e78e4e1c02adc7e9fff67a.exe
> Error: Connection lost.
> {noformat}
> Upon Debugging I found the SftpSystem is terminated because the file channel 
> received close command ( see attached )
> Added event listener to see reading and read method are called but no 
> writing/write methods are never called.
>  
> This can reproducible with v2.2.0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[jira] [Commented] (SSHD-927) SFTP put fails terminating the connection if the remote file exists

2019-06-26 Thread Goldstein Lyor (JIRA)


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

Goldstein Lyor commented on SSHD-927:
-

Unfortunately there is no guide documentation (like I said we are ~1.5 
developers doing it in our spare time) - but specifically for this feature it 
seems pretty straightforward:
 * Add the code to handle the new extension in 
{{AbstractSftpSubsystemHelper#executeExtendedCommand}}
 * Declare the extension name in {{DEFAULT_SUPPORTED_CLIENT_EXTENSIONS}} (same 
class)
 * In the {{org.apache.sshd.client.subsystem.sftp.extensions.helpers}} package 
implement an extension of {{AbstractSftpClientExtension}} for sending and 
receiving the newly added extension
 * Add unit test to check your code

You can see how other extensions are implemented and follow their example

> SFTP put fails terminating the connection if the remote file exists
> ---
>
> Key: SSHD-927
> URL: https://issues.apache.org/jira/browse/SSHD-927
> Project: MINA SSHD
>  Issue Type: Bug
>Affects Versions: 2.1.0, 2.2.0
> Environment: Java:
> C:\Program Files\Java\jdk1.8.0_201\bin>java -version
> java version "1.8.0_201"
> Java(TM) SE Runtime Environment (build 1.8.0_201-b26)
> Java HotSpot(TM) 64-Bit Server VM (build 25.201-b26, mixed mode)
> Apache SSHD : 2.1.0
> C:\temp>sftp2 --version
> sftp2: Tectia Client 6.4.14 on x86-pc-windows
> Build: 26
> Product: Tectia Client
> License type: commercial
> Copyright (C) SSH Communications Security Corporation.
> This software is protected by international copyright laws.
> All rights reserved.
> This product includes software developed by the OpenSSL Project
> for use in the OpenSSL Toolkit. (http://www.openssl.org/)
> SFT API: 2.0.3 (build 6.4.14.26)
>Reporter: Logan
>Assignee: Goldstein Lyor
>Priority: Major
> Attachments: sshd.log, thread-callstack.txt
>
>
> Sftp put fails if the file already exists on the sftp server, terminating the 
> sfp session immediately.Below is the simple configuration to reproduce
>  
> {code:java}
> SshServer sshd = SshServer.setUpDefaultServer();
> sshd.setPort();
> sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider());
> sshd.setSubsystemFactories(Arrays.asList(new SftpSubsystemFactory()));
> sshd.setFileSystemFactory(new VirtualFileSystemFactory(new 
> File("C:/temp").toPath()));
> sshd.setPasswordAuthenticator(AcceptAllPasswordAuthenticator.INSTANCE);
> sshd.start();
> {code}
>  
> {noformat}
> C:\temp>sftp2 test@localhost#
> Host key for the host "localhost#" not found from database.
> The fingerprint of the host public key is:
> Babble: "xodec-damen-ripeg-hehuh-venep-pebys-zureg-rynit-mypiz-byheh-zixax"
> RFC4716: "1d:4f:c2:a4:fe:58:93:61:fe:44:69:26:f2:41:34:f7"
> You can get a public key's fingerprint by running
> % ssh-keygen-g3 -F publickey.pub
> on the key file.
> Please select how you want to proceed.
>  cancel) Cancel the connection.
>  once) Proceed with the connection but do not save the key.
>  save) Proceed with the connection and save the key for future use.
> Please select one (cancel, once, save): once
> test@localhost#'s password:
> Remote system type is POSIX.
> sftp> put ndp46-kb4483451-x64_41ba9b8a814351a318e78e4e1c02adc7e9fff67a.exe
> Error: Connection lost.
> {noformat}
> Upon Debugging I found the SftpSystem is terminated because the file channel 
> received close command ( see attached )
> Added event listener to see reading and read method are called but no 
> writing/write methods are never called.
>  
> This can reproducible with v2.2.0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[jira] [Commented] (SSHD-927) SFTP put fails terminating the connection if the remote file exists

2019-06-26 Thread Logan (JIRA)


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

Logan commented on SSHD-927:


Completely justified! If we were to contribute to implement that required 
functionality here is there a guide/documentation on how to do this? We are not 
fully knowledgeable about semantics but willing to take some initiative if 
there is some guidance/reference.

> SFTP put fails terminating the connection if the remote file exists
> ---
>
> Key: SSHD-927
> URL: https://issues.apache.org/jira/browse/SSHD-927
> Project: MINA SSHD
>  Issue Type: Bug
>Affects Versions: 2.1.0, 2.2.0
> Environment: Java:
> C:\Program Files\Java\jdk1.8.0_201\bin>java -version
> java version "1.8.0_201"
> Java(TM) SE Runtime Environment (build 1.8.0_201-b26)
> Java HotSpot(TM) 64-Bit Server VM (build 25.201-b26, mixed mode)
> Apache SSHD : 2.1.0
> C:\temp>sftp2 --version
> sftp2: Tectia Client 6.4.14 on x86-pc-windows
> Build: 26
> Product: Tectia Client
> License type: commercial
> Copyright (C) SSH Communications Security Corporation.
> This software is protected by international copyright laws.
> All rights reserved.
> This product includes software developed by the OpenSSL Project
> for use in the OpenSSL Toolkit. (http://www.openssl.org/)
> SFT API: 2.0.3 (build 6.4.14.26)
>Reporter: Logan
>Assignee: Goldstein Lyor
>Priority: Major
> Attachments: sshd.log, thread-callstack.txt
>
>
> Sftp put fails if the file already exists on the sftp server, terminating the 
> sfp session immediately.Below is the simple configuration to reproduce
>  
> {code:java}
> SshServer sshd = SshServer.setUpDefaultServer();
> sshd.setPort();
> sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider());
> sshd.setSubsystemFactories(Arrays.asList(new SftpSubsystemFactory()));
> sshd.setFileSystemFactory(new VirtualFileSystemFactory(new 
> File("C:/temp").toPath()));
> sshd.setPasswordAuthenticator(AcceptAllPasswordAuthenticator.INSTANCE);
> sshd.start();
> {code}
>  
> {noformat}
> C:\temp>sftp2 test@localhost#
> Host key for the host "localhost#" not found from database.
> The fingerprint of the host public key is:
> Babble: "xodec-damen-ripeg-hehuh-venep-pebys-zureg-rynit-mypiz-byheh-zixax"
> RFC4716: "1d:4f:c2:a4:fe:58:93:61:fe:44:69:26:f2:41:34:f7"
> You can get a public key's fingerprint by running
> % ssh-keygen-g3 -F publickey.pub
> on the key file.
> Please select how you want to proceed.
>  cancel) Cancel the connection.
>  once) Proceed with the connection but do not save the key.
>  save) Proceed with the connection and save the key for future use.
> Please select one (cancel, once, save): once
> test@localhost#'s password:
> Remote system type is POSIX.
> sftp> put ndp46-kb4483451-x64_41ba9b8a814351a318e78e4e1c02adc7e9fff67a.exe
> Error: Connection lost.
> {noformat}
> Upon Debugging I found the SftpSystem is terminated because the file channel 
> received close command ( see attached )
> Added event listener to see reading and read method are called but no 
> writing/write methods are never called.
>  
> This can reproducible with v2.2.0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[jira] [Commented] (SSHD-927) SFTP put fails terminating the connection if the remote file exists

2019-06-26 Thread Goldstein Lyor (JIRA)


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

Goldstein Lyor commented on SSHD-927:
-

{quote}Why is the affecting only if the file already exists on remote server 
?{quote}
That is something to ask the developers of the client - however, if I had to 
venture a guess I would say that the client checks if the file already exists, 
and if so tries to avoid doing a large copy (or any copy at all) by comparing 
the hashes of the 2 files. There other such "standard" schemes - e.g. 
{{md5-hash}} as specified by [DRAFT 09 - section 
9.1.2|https://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/draft-ietf-secsh-filexfer-09.txt].

{quote}Any plans of supporting this feature in SSHD?{quote}
I don't think so - this is a *proprietary* extension (and there are many more 
out there). The standard seem very clear on this issue - one should ask the 
server about its supported extensions before attempting to use any of them, or 
alternatively be prepared to handle {{SSH_FX_OP_UNSUPPORTED}}. This client 
seems to assume implicitly that the server is of its own "origin" and supports 
this extension, so no need to ask... :(.

Specifically for the SSHD SFTP subsystem implementation we could add a more 
convenient extensions registration mechanism so that users can easily add their 
own (they can still do so, but it is a bit more cumbersome). However, the 
effort must be justified by enough users asking for this feature since we have 
extremely limited R resources at our disposal. This is an open invitation 
though to propose such a mechanism and implement it for anyone who feels it is 
critical - we always welcome contributions.

> SFTP put fails terminating the connection if the remote file exists
> ---
>
> Key: SSHD-927
> URL: https://issues.apache.org/jira/browse/SSHD-927
> Project: MINA SSHD
>  Issue Type: Bug
>Affects Versions: 2.1.0, 2.2.0
> Environment: Java:
> C:\Program Files\Java\jdk1.8.0_201\bin>java -version
> java version "1.8.0_201"
> Java(TM) SE Runtime Environment (build 1.8.0_201-b26)
> Java HotSpot(TM) 64-Bit Server VM (build 25.201-b26, mixed mode)
> Apache SSHD : 2.1.0
> C:\temp>sftp2 --version
> sftp2: Tectia Client 6.4.14 on x86-pc-windows
> Build: 26
> Product: Tectia Client
> License type: commercial
> Copyright (C) SSH Communications Security Corporation.
> This software is protected by international copyright laws.
> All rights reserved.
> This product includes software developed by the OpenSSL Project
> for use in the OpenSSL Toolkit. (http://www.openssl.org/)
> SFT API: 2.0.3 (build 6.4.14.26)
>Reporter: Logan
>Priority: Major
> Attachments: sshd.log, thread-callstack.txt
>
>
> Sftp put fails if the file already exists on the sftp server, terminating the 
> sfp session immediately.Below is the simple configuration to reproduce
>  
> {code:java}
> SshServer sshd = SshServer.setUpDefaultServer();
> sshd.setPort();
> sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider());
> sshd.setSubsystemFactories(Arrays.asList(new SftpSubsystemFactory()));
> sshd.setFileSystemFactory(new VirtualFileSystemFactory(new 
> File("C:/temp").toPath()));
> sshd.setPasswordAuthenticator(AcceptAllPasswordAuthenticator.INSTANCE);
> sshd.start();
> {code}
>  
> {noformat}
> C:\temp>sftp2 test@localhost#
> Host key for the host "localhost#" not found from database.
> The fingerprint of the host public key is:
> Babble: "xodec-damen-ripeg-hehuh-venep-pebys-zureg-rynit-mypiz-byheh-zixax"
> RFC4716: "1d:4f:c2:a4:fe:58:93:61:fe:44:69:26:f2:41:34:f7"
> You can get a public key's fingerprint by running
> % ssh-keygen-g3 -F publickey.pub
> on the key file.
> Please select how you want to proceed.
>  cancel) Cancel the connection.
>  once) Proceed with the connection but do not save the key.
>  save) Proceed with the connection and save the key for future use.
> Please select one (cancel, once, save): once
> test@localhost#'s password:
> Remote system type is POSIX.
> sftp> put ndp46-kb4483451-x64_41ba9b8a814351a318e78e4e1c02adc7e9fff67a.exe
> Error: Connection lost.
> {noformat}
> Upon Debugging I found the SftpSystem is terminated because the file channel 
> received close command ( see attached )
> Added event listener to see reading and read method are called but no 
> writing/write methods are never called.
>  
> This can reproducible with v2.2.0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[jira] [Commented] (SSHD-927) SFTP put fails terminating the connection if the remote file exists

2019-06-25 Thread Logan (JIRA)


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

Logan commented on SSHD-927:


You are indeed correct! I was checking through the [options for 
sftp|https://www.ssh.com/manuals/client-user/44/sftp2_Commands.html] it appears 
the opcode refers to checksum and was default on. Turning off checksum would 
make things smoother.
{noformat}
test@localhost#'s password:
Remote system type is POSIX.
sftp> put --checksum=no ndp46-kb4483451-x64_41ba9b8a814351a318e78e4e1c02adc7e9ff
f67a.exe
..51a318e78e4e1c02adc7e9fff67a.exe | 41MB | 14.2MiB/s | TOC: 00:00:02 | 100%
sftp> put --checksum=no ndp46-kb4483451-x64_41ba9b8a814351a318e78e4e1c02adc7e9ff
f67a.exe
..51a318e78e4e1c02adc7e9fff67a.exe | 41MB | 7.6MiB/s | TOC: 00:00:05 | 100%
sftp> put --checksum=no ndp46-kb4483451-x64_41ba9b8a814351a318e78e4e1c02adc7e9ff
f67a.exe
..51a318e78e4e1c02adc7e9fff67a.exe | 41MB | 6.5MiB/s | TOC: 00:00:06 | 100%
sftp> exit{noformat}
 

However I have 2 questions:
 # Why is the affecting only if the file already exists on remote server?
 # Any plans of supporting this feature in SSHD?

> SFTP put fails terminating the connection if the remote file exists
> ---
>
> Key: SSHD-927
> URL: https://issues.apache.org/jira/browse/SSHD-927
> Project: MINA SSHD
>  Issue Type: Bug
>Affects Versions: 2.1.0, 2.2.0
> Environment: Java:
> C:\Program Files\Java\jdk1.8.0_201\bin>java -version
> java version "1.8.0_201"
> Java(TM) SE Runtime Environment (build 1.8.0_201-b26)
> Java HotSpot(TM) 64-Bit Server VM (build 25.201-b26, mixed mode)
> Apache SSHD : 2.1.0
> C:\temp>sftp2 --version
> sftp2: Tectia Client 6.4.14 on x86-pc-windows
> Build: 26
> Product: Tectia Client
> License type: commercial
> Copyright (C) SSH Communications Security Corporation.
> This software is protected by international copyright laws.
> All rights reserved.
> This product includes software developed by the OpenSSL Project
> for use in the OpenSSL Toolkit. (http://www.openssl.org/)
> SFT API: 2.0.3 (build 6.4.14.26)
>Reporter: Logan
>Priority: Major
> Attachments: sshd.log, thread-callstack.txt
>
>
> Sftp put fails if the file already exists on the sftp server, terminating the 
> sfp session immediately.Below is the simple configuration to reproduce
>  
> {code:java}
> SshServer sshd = SshServer.setUpDefaultServer();
> sshd.setPort();
> sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider());
> sshd.setSubsystemFactories(Arrays.asList(new SftpSubsystemFactory()));
> sshd.setFileSystemFactory(new VirtualFileSystemFactory(new 
> File("C:/temp").toPath()));
> sshd.setPasswordAuthenticator(AcceptAllPasswordAuthenticator.INSTANCE);
> sshd.start();
> {code}
>  
> {noformat}
> C:\temp>sftp2 test@localhost#
> Host key for the host "localhost#" not found from database.
> The fingerprint of the host public key is:
> Babble: "xodec-damen-ripeg-hehuh-venep-pebys-zureg-rynit-mypiz-byheh-zixax"
> RFC4716: "1d:4f:c2:a4:fe:58:93:61:fe:44:69:26:f2:41:34:f7"
> You can get a public key's fingerprint by running
> % ssh-keygen-g3 -F publickey.pub
> on the key file.
> Please select how you want to proceed.
>  cancel) Cancel the connection.
>  once) Proceed with the connection but do not save the key.
>  save) Proceed with the connection and save the key for future use.
> Please select one (cancel, once, save): once
> test@localhost#'s password:
> Remote system type is POSIX.
> sftp> put ndp46-kb4483451-x64_41ba9b8a814351a318e78e4e1c02adc7e9fff67a.exe
> Error: Connection lost.
> {noformat}
> Upon Debugging I found the SftpSystem is terminated because the file channel 
> received close command ( see attached )
> Added event listener to see reading and read method are called but no 
> writing/write methods are never called.
>  
> This can reproducible with v2.2.0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[jira] [Commented] (SSHD-927) SFTP put fails terminating the connection if the remote file exists

2019-06-25 Thread Goldstein Lyor (JIRA)


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

Goldstein Lyor commented on SSHD-927:
-

I think I do see a problem:
{noformat}
14:42:08.130 [sshd-SftpSubsystem-thread-1] DEBUG 
o.a.s.s.subsystem.sftp.SftpSubsystem - 
process(ServerSessionImpl[test@/127.0.0.1:62996])[length=91, 
type=SSH_FXP_EXTENDED, id=5] processing
14:42:08.131 [sshd-SftpSubsystem-thread-1] DEBUG 
o.a.s.s.subsystem.sftp.SftpSubsystem - 
executeExtendedCommand(ServerSessionImpl[test@/127.0.0.1:62996]) received 
unsupported SSH_FXP_EXTENDED(file-content-has...@ssh.com)
14:42:08.132 [sshd-SftpSubsystem-thread-1] DEBUG 
o.a.s.s.subsystem.sftp.SftpSubsystem - 
doSendStatus(ServerSessionImpl[test@/127.0.0.1:62996])[id=5] SSH_FXP_STATUS 
(substatus=SSH_FX_OP_UNSUPPORTED, lang=, msg=Command 
SSH_FXP_EXTENDED(file-content-has...@ssh.com) is unsupported or not implemented)
{noformat}
The client sends an unsupported extended opcode 
({{(file-content-has...@ssh.com}}) - SSHD behaves according to the standard:
{quote}
 If the server does not recognize the 'extended-request' name, then the server 
MUST respond with SSH_FXP_STATUS with error/status set to SSH_FX_OP_UNSUPPORTED.
{quote}
it seems that the client takes it badly and decides to close the connection.

> SFTP put fails terminating the connection if the remote file exists
> ---
>
> Key: SSHD-927
> URL: https://issues.apache.org/jira/browse/SSHD-927
> Project: MINA SSHD
>  Issue Type: Bug
>Affects Versions: 2.1.0, 2.2.0
> Environment: Java:
> C:\Program Files\Java\jdk1.8.0_201\bin>java -version
> java version "1.8.0_201"
> Java(TM) SE Runtime Environment (build 1.8.0_201-b26)
> Java HotSpot(TM) 64-Bit Server VM (build 25.201-b26, mixed mode)
> Apache SSHD : 2.1.0
> C:\temp>sftp2 --version
> sftp2: Tectia Client 6.4.14 on x86-pc-windows
> Build: 26
> Product: Tectia Client
> License type: commercial
> Copyright (C) SSH Communications Security Corporation.
> This software is protected by international copyright laws.
> All rights reserved.
> This product includes software developed by the OpenSSL Project
> for use in the OpenSSL Toolkit. (http://www.openssl.org/)
> SFT API: 2.0.3 (build 6.4.14.26)
>Reporter: Logan
>Priority: Major
> Attachments: sshd.log, thread-callstack.txt
>
>
> Sftp put fails if the file already exists on the sftp server, terminating the 
> sfp session immediately.Below is the simple configuration to reproduce
>  
> {code:java}
> SshServer sshd = SshServer.setUpDefaultServer();
> sshd.setPort();
> sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider());
> sshd.setSubsystemFactories(Arrays.asList(new SftpSubsystemFactory()));
> sshd.setFileSystemFactory(new VirtualFileSystemFactory(new 
> File("C:/temp").toPath()));
> sshd.setPasswordAuthenticator(AcceptAllPasswordAuthenticator.INSTANCE);
> sshd.start();
> {code}
>  
> {noformat}
> C:\temp>sftp2 test@localhost#
> Host key for the host "localhost#" not found from database.
> The fingerprint of the host public key is:
> Babble: "xodec-damen-ripeg-hehuh-venep-pebys-zureg-rynit-mypiz-byheh-zixax"
> RFC4716: "1d:4f:c2:a4:fe:58:93:61:fe:44:69:26:f2:41:34:f7"
> You can get a public key's fingerprint by running
> % ssh-keygen-g3 -F publickey.pub
> on the key file.
> Please select how you want to proceed.
>  cancel) Cancel the connection.
>  once) Proceed with the connection but do not save the key.
>  save) Proceed with the connection and save the key for future use.
> Please select one (cancel, once, save): once
> test@localhost#'s password:
> Remote system type is POSIX.
> sftp> put ndp46-kb4483451-x64_41ba9b8a814351a318e78e4e1c02adc7e9fff67a.exe
> Error: Connection lost.
> {noformat}
> Upon Debugging I found the SftpSystem is terminated because the file channel 
> received close command ( see attached )
> Added event listener to see reading and read method are called but no 
> writing/write methods are never called.
>  
> This can reproducible with v2.2.0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[jira] [Commented] (SSHD-927) SFTP put fails terminating the connection if the remote file exists

2019-06-25 Thread Goldstein Lyor (JIRA)


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

Goldstein Lyor commented on SSHD-927:
-

Thanks,  I will look it over and see if I can figure out what went wrong. 
Failing that I'll see if I can install the client you are using and reproduce 
the issue. It may take quite some time though, so if it is a critical issue for 
you, perhaps you  can try and debug it - basically the {{SftpSubsystem}} class 
is involved...

> SFTP put fails terminating the connection if the remote file exists
> ---
>
> Key: SSHD-927
> URL: https://issues.apache.org/jira/browse/SSHD-927
> Project: MINA SSHD
>  Issue Type: Bug
>Affects Versions: 2.1.0, 2.2.0
> Environment: Java:
> C:\Program Files\Java\jdk1.8.0_201\bin>java -version
> java version "1.8.0_201"
> Java(TM) SE Runtime Environment (build 1.8.0_201-b26)
> Java HotSpot(TM) 64-Bit Server VM (build 25.201-b26, mixed mode)
> Apache SSHD : 2.1.0
> C:\temp>sftp2 --version
> sftp2: Tectia Client 6.4.14 on x86-pc-windows
> Build: 26
> Product: Tectia Client
> License type: commercial
> Copyright (C) SSH Communications Security Corporation.
> This software is protected by international copyright laws.
> All rights reserved.
> This product includes software developed by the OpenSSL Project
> for use in the OpenSSL Toolkit. (http://www.openssl.org/)
> SFT API: 2.0.3 (build 6.4.14.26)
>Reporter: Logan
>Priority: Major
> Attachments: sshd.log, thread-callstack.txt
>
>
> Sftp put fails if the file already exists on the sftp server, terminating the 
> sfp session immediately.Below is the simple configuration to reproduce
>  
> {code:java}
> SshServer sshd = SshServer.setUpDefaultServer();
> sshd.setPort();
> sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider());
> sshd.setSubsystemFactories(Arrays.asList(new SftpSubsystemFactory()));
> sshd.setFileSystemFactory(new VirtualFileSystemFactory(new 
> File("C:/temp").toPath()));
> sshd.setPasswordAuthenticator(AcceptAllPasswordAuthenticator.INSTANCE);
> sshd.start();
> {code}
>  
> {noformat}
> C:\temp>sftp2 test@localhost#
> Host key for the host "localhost#" not found from database.
> The fingerprint of the host public key is:
> Babble: "xodec-damen-ripeg-hehuh-venep-pebys-zureg-rynit-mypiz-byheh-zixax"
> RFC4716: "1d:4f:c2:a4:fe:58:93:61:fe:44:69:26:f2:41:34:f7"
> You can get a public key's fingerprint by running
> % ssh-keygen-g3 -F publickey.pub
> on the key file.
> Please select how you want to proceed.
>  cancel) Cancel the connection.
>  once) Proceed with the connection but do not save the key.
>  save) Proceed with the connection and save the key for future use.
> Please select one (cancel, once, save): once
> test@localhost#'s password:
> Remote system type is POSIX.
> sftp> put ndp46-kb4483451-x64_41ba9b8a814351a318e78e4e1c02adc7e9fff67a.exe
> Error: Connection lost.
> {noformat}
> Upon Debugging I found the SftpSystem is terminated because the file channel 
> received close command ( see attached )
> Added event listener to see reading and read method are called but no 
> writing/write methods are never called.
>  
> This can reproducible with v2.2.0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[jira] [Commented] (SSHD-927) SFTP put fails terminating the connection if the remote file exists

2019-06-24 Thread Logan (JIRA)


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

Logan commented on SSHD-927:


Not much is logged with INFO setting. Attached are logs with DEBUG settings

> SFTP put fails terminating the connection if the remote file exists
> ---
>
> Key: SSHD-927
> URL: https://issues.apache.org/jira/browse/SSHD-927
> Project: MINA SSHD
>  Issue Type: Bug
>Affects Versions: 2.1.0, 2.2.0
> Environment: Java:
> C:\Program Files\Java\jdk1.8.0_201\bin>java -version
> java version "1.8.0_201"
> Java(TM) SE Runtime Environment (build 1.8.0_201-b26)
> Java HotSpot(TM) 64-Bit Server VM (build 25.201-b26, mixed mode)
> Apache SSHD : 2.1.0
> C:\temp>sftp2 --version
> sftp2: Tectia Client 6.4.14 on x86-pc-windows
> Build: 26
> Product: Tectia Client
> License type: commercial
> Copyright (C) SSH Communications Security Corporation.
> This software is protected by international copyright laws.
> All rights reserved.
> This product includes software developed by the OpenSSL Project
> for use in the OpenSSL Toolkit. (http://www.openssl.org/)
> SFT API: 2.0.3 (build 6.4.14.26)
>Reporter: Logan
>Priority: Major
> Attachments: sshd.log, thread-callstack.txt
>
>
> Sftp put fails if the file already exists on the sftp server, terminating the 
> sfp session immediately.Below is the simple configuration to reproduce
>  
> {code:java}
> SshServer sshd = SshServer.setUpDefaultServer();
> sshd.setPort();
> sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider());
> sshd.setSubsystemFactories(Arrays.asList(new SftpSubsystemFactory()));
> sshd.setFileSystemFactory(new VirtualFileSystemFactory(new 
> File("C:/temp").toPath()));
> sshd.setPasswordAuthenticator(AcceptAllPasswordAuthenticator.INSTANCE);
> sshd.start();
> {code}
>  
> {noformat}
> C:\temp>sftp2 test@localhost#
> Host key for the host "localhost#" not found from database.
> The fingerprint of the host public key is:
> Babble: "xodec-damen-ripeg-hehuh-venep-pebys-zureg-rynit-mypiz-byheh-zixax"
> RFC4716: "1d:4f:c2:a4:fe:58:93:61:fe:44:69:26:f2:41:34:f7"
> You can get a public key's fingerprint by running
> % ssh-keygen-g3 -F publickey.pub
> on the key file.
> Please select how you want to proceed.
>  cancel) Cancel the connection.
>  once) Proceed with the connection but do not save the key.
>  save) Proceed with the connection and save the key for future use.
> Please select one (cancel, once, save): once
> test@localhost#'s password:
> Remote system type is POSIX.
> sftp> put ndp46-kb4483451-x64_41ba9b8a814351a318e78e4e1c02adc7e9fff67a.exe
> Error: Connection lost.
> {noformat}
> Upon Debugging I found the SftpSystem is terminated because the file channel 
> received close command ( see attached )
> Added event listener to see reading and read method are called but no 
> writing/write methods are never called.
>  
> This can reproducible with v2.2.0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[jira] [Commented] (SSHD-927) SFTP put fails terminating the connection if the remote file exists

2019-06-24 Thread Goldstein Lyor (JIRA)


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

Goldstein Lyor commented on SSHD-927:
-

{quote}
Would you like to capture SSHD logs at debug or info level?
{quote}
Let's start with the easiest - INFO level (and WARN and ERROR of course)  - 
should provide a starting hint

> SFTP put fails terminating the connection if the remote file exists
> ---
>
> Key: SSHD-927
> URL: https://issues.apache.org/jira/browse/SSHD-927
> Project: MINA SSHD
>  Issue Type: Bug
>Affects Versions: 2.1.0, 2.2.0
> Environment: Java:
> C:\Program Files\Java\jdk1.8.0_201\bin>java -version
> java version "1.8.0_201"
> Java(TM) SE Runtime Environment (build 1.8.0_201-b26)
> Java HotSpot(TM) 64-Bit Server VM (build 25.201-b26, mixed mode)
> Apache SSHD : 2.1.0
> C:\temp>sftp2 --version
> sftp2: Tectia Client 6.4.14 on x86-pc-windows
> Build: 26
> Product: Tectia Client
> License type: commercial
> Copyright (C) SSH Communications Security Corporation.
> This software is protected by international copyright laws.
> All rights reserved.
> This product includes software developed by the OpenSSL Project
> for use in the OpenSSL Toolkit. (http://www.openssl.org/)
> SFT API: 2.0.3 (build 6.4.14.26)
>Reporter: Logan
>Priority: Major
> Attachments: thread-callstack.txt
>
>
> Sftp put fails if the file already exists on the sftp server, terminating the 
> sfp session immediately.Below is the simple configuration to reproduce
>  
> {code:java}
> SshServer sshd = SshServer.setUpDefaultServer();
> sshd.setPort();
> sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider());
> sshd.setSubsystemFactories(Arrays.asList(new SftpSubsystemFactory()));
> sshd.setFileSystemFactory(new VirtualFileSystemFactory(new 
> File("C:/temp").toPath()));
> sshd.setPasswordAuthenticator(AcceptAllPasswordAuthenticator.INSTANCE);
> sshd.start();
> {code}
>  
> {noformat}
> C:\temp>sftp2 test@localhost#
> Host key for the host "localhost#" not found from database.
> The fingerprint of the host public key is:
> Babble: "xodec-damen-ripeg-hehuh-venep-pebys-zureg-rynit-mypiz-byheh-zixax"
> RFC4716: "1d:4f:c2:a4:fe:58:93:61:fe:44:69:26:f2:41:34:f7"
> You can get a public key's fingerprint by running
> % ssh-keygen-g3 -F publickey.pub
> on the key file.
> Please select how you want to proceed.
>  cancel) Cancel the connection.
>  once) Proceed with the connection but do not save the key.
>  save) Proceed with the connection and save the key for future use.
> Please select one (cancel, once, save): once
> test@localhost#'s password:
> Remote system type is POSIX.
> sftp> put ndp46-kb4483451-x64_41ba9b8a814351a318e78e4e1c02adc7e9fff67a.exe
> Error: Connection lost.
> {noformat}
> Upon Debugging I found the SftpSystem is terminated because the file channel 
> received close command ( see attached )
> Added event listener to see reading and read method are called but no 
> writing/write methods are never called.
>  
> This can reproducible with v2.2.0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[jira] [Commented] (SSHD-927) SFTP put fails terminating the connection if the remote file exists

2019-06-24 Thread Logan (JIRA)


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

Logan commented on SSHD-927:


SSH client is from Tectia ( [https://www.ssh.com/products/tectia-ssh/] ). 
Details of version is included in environment.

Would you like to capture SSHD logs at debug or info level?

Downloaded latest [putty 
sftp|https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html] and it 
works well.
{noformat}
C:\temp>psftp -P  localhost
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 b9:e1:24:12:be:fd:8d:f9:c0:60:38:c9:8b:7c:c0:b0
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n) n
login as: test
Keyboard-interactive authentication prompts from server:
| Password authentication
| Password:
End of keyboard-interactive prompts from server
Remote working directory is /
psftp> put psftp.exe
local:psftp.exe => remote:/psftp.exe
psftp> put psftp.exe
local:psftp.exe => remote:/psftp.exe
psftp> put psftp.exe
local:psftp.exe => remote:/psftp.exe
psftp> put psftp.exe
local:psftp.exe => remote:/psftp.exe
psftp> put psftp.exe
local:psftp.exe => remote:/psftp.exe
psftp> put psftp.exe
local:psftp.exe => remote:/psftp.exe
psftp> exit
{noformat}

> SFTP put fails terminating the connection if the remote file exists
> ---
>
> Key: SSHD-927
> URL: https://issues.apache.org/jira/browse/SSHD-927
> Project: MINA SSHD
>  Issue Type: Bug
>Affects Versions: 2.1.0, 2.2.0
> Environment: Java:
> C:\Program Files\Java\jdk1.8.0_201\bin>java -version
> java version "1.8.0_201"
> Java(TM) SE Runtime Environment (build 1.8.0_201-b26)
> Java HotSpot(TM) 64-Bit Server VM (build 25.201-b26, mixed mode)
> Apache SSHD : 2.1.0
> C:\temp>sftp2 --version
> sftp2: Tectia Client 6.4.14 on x86-pc-windows
> Build: 26
> Product: Tectia Client
> License type: commercial
> Copyright (C) SSH Communications Security Corporation.
> This software is protected by international copyright laws.
> All rights reserved.
> This product includes software developed by the OpenSSL Project
> for use in the OpenSSL Toolkit. (http://www.openssl.org/)
> SFT API: 2.0.3 (build 6.4.14.26)
>Reporter: Logan
>Priority: Major
> Attachments: thread-callstack.txt
>
>
> Sftp put fails if the file already exists on the sftp server, terminating the 
> sfp session immediately.Below is the simple configuration to reproduce
>  
> {code:java}
> SshServer sshd = SshServer.setUpDefaultServer();
> sshd.setPort();
> sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider());
> sshd.setSubsystemFactories(Arrays.asList(new SftpSubsystemFactory()));
> sshd.setFileSystemFactory(new VirtualFileSystemFactory(new 
> File("C:/temp").toPath()));
> sshd.setPasswordAuthenticator(AcceptAllPasswordAuthenticator.INSTANCE);
> sshd.start();
> {code}
>  
> {noformat}
> C:\temp>sftp2 test@localhost#
> Host key for the host "localhost#" not found from database.
> The fingerprint of the host public key is:
> Babble: "xodec-damen-ripeg-hehuh-venep-pebys-zureg-rynit-mypiz-byheh-zixax"
> RFC4716: "1d:4f:c2:a4:fe:58:93:61:fe:44:69:26:f2:41:34:f7"
> You can get a public key's fingerprint by running
> % ssh-keygen-g3 -F publickey.pub
> on the key file.
> Please select how you want to proceed.
>  cancel) Cancel the connection.
>  once) Proceed with the connection but do not save the key.
>  save) Proceed with the connection and save the key for future use.
> Please select one (cancel, once, save): once
> test@localhost#'s password:
> Remote system type is POSIX.
> sftp> put ndp46-kb4483451-x64_41ba9b8a814351a318e78e4e1c02adc7e9fff67a.exe
> Error: Connection lost.
> {noformat}
> Upon Debugging I found the SftpSystem is terminated because the file channel 
> received close command ( see attached )
> Added event listener to see reading and read method are called but no 
> writing/write methods are never called.
>  
> This can reproducible with v2.2.0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[jira] [Commented] (SSHD-927) SFTP put fails terminating the connection if the remote file exists

2019-06-23 Thread Goldstein Lyor (JIRA)


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

Goldstein Lyor commented on SSHD-927:
-

Can you also provide log messages from the Java side (the call stack is not 
informative enough) ?

> SFTP put fails terminating the connection if the remote file exists
> ---
>
> Key: SSHD-927
> URL: https://issues.apache.org/jira/browse/SSHD-927
> Project: MINA SSHD
>  Issue Type: Bug
>Affects Versions: 2.1.0, 2.2.0
> Environment: Java:
> C:\Program Files\Java\jdk1.8.0_201\bin>java -version
> java version "1.8.0_201"
> Java(TM) SE Runtime Environment (build 1.8.0_201-b26)
> Java HotSpot(TM) 64-Bit Server VM (build 25.201-b26, mixed mode)
> Apache SSHD : 2.1.0
> C:\temp>sftp2 --version
> sftp2: Tectia Client 6.4.14 on x86-pc-windows
> Build: 26
> Product: Tectia Client
> License type: commercial
> Copyright (C) SSH Communications Security Corporation.
> This software is protected by international copyright laws.
> All rights reserved.
> This product includes software developed by the OpenSSL Project
> for use in the OpenSSL Toolkit. (http://www.openssl.org/)
> SFT API: 2.0.3 (build 6.4.14.26)
>Reporter: Logan
>Priority: Major
> Attachments: thread-callstack.txt
>
>
> Sftp put fails if the file already exists on the sftp server, terminating the 
> sfp session immediately.Below is the simple configuration to reproduce
>  
> {code:java}
> SshServer sshd = SshServer.setUpDefaultServer();
> sshd.setPort();
> sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider());
> sshd.setSubsystemFactories(Arrays.asList(new SftpSubsystemFactory()));
> sshd.setFileSystemFactory(new VirtualFileSystemFactory(new 
> File("C:/temp").toPath()));
> sshd.setPasswordAuthenticator(AcceptAllPasswordAuthenticator.INSTANCE);
> sshd.start();
> {code}
>  
> {noformat}
> C:\temp>sftp2 test@localhost#
> Host key for the host "localhost#" not found from database.
> The fingerprint of the host public key is:
> Babble: "xodec-damen-ripeg-hehuh-venep-pebys-zureg-rynit-mypiz-byheh-zixax"
> RFC4716: "1d:4f:c2:a4:fe:58:93:61:fe:44:69:26:f2:41:34:f7"
> You can get a public key's fingerprint by running
> % ssh-keygen-g3 -F publickey.pub
> on the key file.
> Please select how you want to proceed.
>  cancel) Cancel the connection.
>  once) Proceed with the connection but do not save the key.
>  save) Proceed with the connection and save the key for future use.
> Please select one (cancel, once, save): once
> test@localhost#'s password:
> Remote system type is POSIX.
> sftp> put ndp46-kb4483451-x64_41ba9b8a814351a318e78e4e1c02adc7e9fff67a.exe
> Error: Connection lost.
> {noformat}
> Upon Debugging I found the SftpSystem is terminated because the file channel 
> received close command ( see attached )
> Added event listener to see reading and read method are called but no 
> writing/write methods are never called.
>  
> This can reproducible with v2.2.0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[jira] [Commented] (SSHD-927) SFTP put fails terminating the connection if the remote file exists

2019-06-23 Thread Goldstein Lyor (JIRA)


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

Goldstein Lyor commented on SSHD-927:
-

I do see something "strange" so to speak: the example is using a Windows client 
called {{sftp2}} - can you provide some details about this client ? Where can I 
download/install it in order to see if it behaves in some unexpected manner ?

Very strange - SFTP is one of the most stable subsystem implementations we have 
- at least as far as compatibility with Linux, Putty and WinSCP - that's why I 
am curious about this {{sftp2}}. BTW, have you tried WinSCP with the Java 
server ? Should work...


> SFTP put fails terminating the connection if the remote file exists
> ---
>
> Key: SSHD-927
> URL: https://issues.apache.org/jira/browse/SSHD-927
> Project: MINA SSHD
>  Issue Type: Bug
>Affects Versions: 2.1.0, 2.2.0
> Environment: Java:
> C:\Program Files\Java\jdk1.8.0_201\bin>java -version
> java version "1.8.0_201"
> Java(TM) SE Runtime Environment (build 1.8.0_201-b26)
> Java HotSpot(TM) 64-Bit Server VM (build 25.201-b26, mixed mode)
> Apache SSHD : 2.1.0
> C:\temp>sftp2 --version
> sftp2: Tectia Client 6.4.14 on x86-pc-windows
> Build: 26
> Product: Tectia Client
> License type: commercial
> Copyright (C) SSH Communications Security Corporation.
> This software is protected by international copyright laws.
> All rights reserved.
> This product includes software developed by the OpenSSL Project
> for use in the OpenSSL Toolkit. (http://www.openssl.org/)
> SFT API: 2.0.3 (build 6.4.14.26)
>Reporter: Logan
>Priority: Major
> Attachments: thread-callstack.txt
>
>
> Sftp put fails if the file already exists on the sftp server, terminating the 
> sfp session immediately.Below is the simple configuration to reproduce
>  
> {code:java}
> SshServer sshd = SshServer.setUpDefaultServer();
> sshd.setPort();
> sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider());
> sshd.setSubsystemFactories(Arrays.asList(new SftpSubsystemFactory()));
> sshd.setFileSystemFactory(new VirtualFileSystemFactory(new 
> File("C:/temp").toPath()));
> sshd.setPasswordAuthenticator(AcceptAllPasswordAuthenticator.INSTANCE);
> sshd.start();
> {code}
>  
> {noformat}
> C:\temp>sftp2 test@localhost#
> Host key for the host "localhost#" not found from database.
> The fingerprint of the host public key is:
> Babble: "xodec-damen-ripeg-hehuh-venep-pebys-zureg-rynit-mypiz-byheh-zixax"
> RFC4716: "1d:4f:c2:a4:fe:58:93:61:fe:44:69:26:f2:41:34:f7"
> You can get a public key's fingerprint by running
> % ssh-keygen-g3 -F publickey.pub
> on the key file.
> Please select how you want to proceed.
>  cancel) Cancel the connection.
>  once) Proceed with the connection but do not save the key.
>  save) Proceed with the connection and save the key for future use.
> Please select one (cancel, once, save): once
> test@localhost#'s password:
> Remote system type is POSIX.
> sftp> put ndp46-kb4483451-x64_41ba9b8a814351a318e78e4e1c02adc7e9fff67a.exe
> Error: Connection lost.
> {noformat}
> Upon Debugging I found the SftpSystem is terminated because the file channel 
> received close command ( see attached )
> Added event listener to see reading and read method are called but no 
> writing/write methods are never called.
>  
> This can reproducible with v2.2.0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org