Václav Starý
Václav Starý

Reputation: 327

SFTP - connection was aborted (C#)

I have tool which download files from sftp. This tool working for 2 years but now it stop working. Error received is:

An established connection was aborted by the software in your host machine.

Host machine is on customer site and it is very complicated to get any log from HOST. I would like to ask you what is possible reasons.

Here is log from my tool:

2016-05-24 12:00:00,887 DEBUG [1] LoggingManager:0 Using key authentification, private key file: 'C:\Programme\PMS\SCPCopy\unionkey\pmsui_keyfile.id'.
2016-05-24 12:00:01,027 DEBUG [1] LoggingManager:0 Connecting to server: '1.1.1.1' port: '22'
2016-05-24 12:00:01,043 DEBUG [1] SSHDotNetSftpProvider:0 Connect...
2016-05-24 12:00:01,043 DEBUG [1] BaseClient:0 Connect
2016-05-24 12:00:01,058 DEBUG [1] ConnectionInfo:0 Attempt to create new session for the following connection info:
2016-05-24 12:00:01,058 DEBUG [1] ConnectionInfo:0 Host: 1.1.1.1
2016-05-24 12:00:01,058 DEBUG [1] ConnectionInfo:0 Port: 22
2016-05-24 12:00:01,058 DEBUG [1] ConnectionInfo:0 Username: XXXXX
2016-05-24 12:00:01,058 DEBUG [1] ConnectionInfo:0 ProxyType: None
2016-05-24 12:00:01,058 DEBUG [1] ConnectionInfo:0 ProxyHost:
2016-05-24 12:00:01,058 DEBUG [1] ConnectionInfo:0 ProxyPort: 0
2016-05-24 12:00:01,058 DEBUG [1] ConnectionInfo:0 ProxyUsername:
2016-05-24 12:00:01,058 DEBUG [1] ConnectionInfo:0 ProxyPassword:
2016-05-24 12:00:01,058 DEBUG [1] ConnectionInfo:0 RetryAttempts: 10
2016-05-24 12:00:01,058 DEBUG [1] ConnectionInfo:0 Encoding: System.Text.UTF8Encoding
2016-05-24 12:00:01,058 DEBUG [1] ConnectionInfo:0 MaxSessions: 10
2016-05-24 12:00:01,074 DEBUG [1] ConnectionInfo:0 KeyExchangeAlgorithm:
2016-05-24 12:00:01,074 DEBUG [1] ConnectionInfo:0 ServerEncryption:
2016-05-24 12:00:01,074 DEBUG [1] ConnectionInfo:0 ClientEncryption:
2016-05-24 12:00:01,074 DEBUG [1] ConnectionInfo:0 ServerHmacAlgorithm:
2016-05-24 12:00:01,074 DEBUG [1] ConnectionInfo:0 ClientHmacAlgorithm:
2016-05-24 12:00:01,074 DEBUG [1] ConnectionInfo:0 HostKeyAlgorithm:
2016-05-24 12:00:01,074 DEBUG [1] ConnectionInfo:0 ServerCompressionAlgorithm:
2016-05-24 12:00:01,074 DEBUG [1] ConnectionInfo:0 ClientCompressionAlgorithm:
2016-05-24 12:00:01,074 DEBUG [1] ConnectionInfo:0 ServerVersion:
2016-05-24 12:00:01,074 DEBUG [1] ConnectionInfo:0 ClientVersion:
2016-05-24 12:00:01,074 DEBUG [1] BaseClient:0 Attempt to create new session
2016-05-24 12:00:01,090 DEBUG [1] Session:0 Wait for the connection authentication
2016-05-24 12:00:01,105 DEBUG [1] Session:0 GetMessagesMetadata
2016-05-24 12:00:01,105 DEBUG [1] Session:0 Proxy type: None
2016-05-24 12:00:01,105 DEBUG [1] Session:0 Host: 1.1.1.1
2016-05-24 12:00:01,105 DEBUG [1] Session:0 Port: 22
2016-05-24 12:00:01,152 DEBUG [1] Session:0 ConnectionInfo: SSH-2.0-OpenSSH_7.2
2016-05-24 12:00:01,152 DEBUG [1] Session:0 ClientVersion: SSH-2.0-Renci.SshNet.SshClient.0.0.1
2016-05-24 12:00:01,152 DEBUG [1] Session:0 Server version: 2.0
2016-05-24 12:00:01,152 DEBUG [1] Session:0 Software name: OpenSSH_7.2
2016-05-24 12:00:01,277 DEBUG [1] LoggingManager:0 An error occured: An established connection was aborted by the software in your host machine.

For sftp connection is used Renci.SshNet (version 2013.4.7)

Upvotes: 0

Views: 5379

Answers (1)

Václav Starý
Václav Starý

Reputation: 327

Problem was in Renci.SshNet (version 2013.4.7). This version was able to communicate with SSH-2.0-OpenSSH_6.7 but not with SSH-2.0-OpenSSH_7.2.

Actual version of Renci.SshNet solved this issue.

Upvotes: 2

Related Questions