Quantcast
Channel: Rebex Q&A Forum - Recent questions and answers
Viewing all articles
Browse latest Browse all 3862

Answered: Negotiation failed. The connection was closed by the server.

$
0
0

I have compared the logs produced by old version and new version.
The offered algorithms differ a little. It seems that this caused the issue with your server. Can you please try to enable the exactly same algorithms and use it with the new version?

It can be done like this:

Dim thisSFTP = New Rebex.Net.Sftp

Dim par = thisSFTP.Settings.SshParameters
par.SetKeyExchangeAlgorithms("diffie-hellman-group-exchange-sha256",
                                "diffie-hellman-group14-sha256",
                                "diffie-hellman-group15-sha512",
                                "diffie-hellman-group16-sha512",
                                "diffie-hellman-group-exchange-sha1",
                                "diffie-hellman-group14-sha1",
                                "ecdh-sha2-nistp256")
par.SetHostKeyAlgorithms("ssh-dss",
                            "rsa-sha2-256",
                            "ssh-rsa-sha256@ssh.com",
                            "rsa-sha2-512",
                            "ssh-rsa",
                            "x509v3-sign-rsa-sha256@ssh.com",
                            "x509v3-sign-rsa",
                            "x509v3-sign-dss",
                            "ecdsa-sha2-nistp256")
par.SetEncryptionAlgorithms("aes256-ctr",
                                "aes192-ctr",
                                "aes128-ctr",
                                "aes256-cbc",
                                "aes192-cbc",
                                "aes128-cbc",
                                "3des-ctr",
                                "3des-cbc",
                                "twofish256-ctr",
                                "twofish192-ctr",
                                "twofish128-ctr",
                                "twofish256-cbc",
                                "twofish192-cbc",
                                "twofish128-cbc",
                                "twofish-cbc")
par.SetMacAlgorithms("hmac-sha2-256",
                    "hmac-sha2-512",
                    "hmac-sha1")

thisSFTP.LogWriter = new Rebex.FileLogWriter(FtpDebugFile, Rebex.LogLevel.Debug)
thisSFTP.Connect(Instance.remoteHost, Instance.remoteHostPort)

Please let us know, whether using this settings, you are able to connect to your server.


Viewing all articles
Browse latest Browse all 3862

Trending Articles