tag:help.appveyor.com,2012-11-13:/discussions/problems/34048-cannot-connect-sftp-server-failed-to-negotiate-key-exchange-algorithmAppVeyor: Discussion 2023-04-26T21:02:58Ztag:help.appveyor.com,2012-11-13:Comment/580321722023-02-22T08:26:29Z2023-02-22T08:26:38ZCannot connect SFTP server: Failed to negotiate key exchange algorithm.<div><p>The email blocked algorithm is:<br>
curve25519-sha256 AT libssh.org</p></div>Christoffertag:help.appveyor.com,2012-11-13:Comment/580321722023-02-22T16:10:33Z2023-02-22T16:10:33ZCannot connect SFTP server: Failed to negotiate key exchange algorithm.<div><p>Right, AppVeyor doesn't use the latest SSH.NET library.</p>
<p>Why don't you try updating it during the build, on <code>init</code> stage with the following two commands:</p>
<pre>
<code>init:
- nuget install ssh.net -ExcludeVersion
- copy /Y SSH.NET\lib\net40\* "C:\Program Files\AppVeyor\BuildAgent"</code>
</pre>
<p>If method signatures have not changed it could do the trick. Let me know if that worked.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/580321722023-02-23T06:18:04Z2023-02-23T06:18:05ZCannot connect SFTP server: Failed to negotiate key exchange algorithm.<div><p>Thanks, I’ll try that. Curious though, what version do you run? Because some of my algorithms should match even in very old versions.</p>
<p>Från: Feodor Fitsner <a href="mailto:tender2+dd06d534b3@tenderapp.com">tender2+dd06d534b3@tenderapp.com</a><br>
Datum: onsdag, 22 februari 2023 17:11<br>
Till: Christoffer Bredberg <a href="mailto:christoffer.bredberg@rudholmgroup.com">christoffer.bredberg@rudholmgroup.com</a><br>
Ämne: Re: Cannot connect SFTP server: Failed to negotiate key exchange algorithm. [Problems #34048]</p></div>Christoffer Bredbergtag:help.appveyor.com,2012-11-13:Comment/580321722023-02-23T18:23:37Z2023-02-23T18:23:37ZCannot connect SFTP server: Failed to negotiate key exchange algorithm.<div><p>AppVeyor uses version <code>2016.0.0</code>.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/580321722023-02-23T18:29:59Z2023-02-23T18:30:06ZCannot connect SFTP server: Failed to negotiate key exchange algorithm.<div><p>Thank you!</p>
<p>Even that version should support those algorithms according to that versions readme:<br>
<a href="https://github.com/sshnet/SSH.NET/blob/2016.0.0/README.md">https://github.com/sshnet/SSH.NET/blob/2016.0.0/README.md</a></p>
<p>I might have confused their stated diffie-hellman-group-exchange-sha256 with our accepted diffie-hellman-group14-exchange-sha256 though. Could be a difference there, probably explains it.</p>
<p>Unfortunately I was not able to run your init suggestion, seems there have been changes since then:</p>
<p>Could not load file or assembly 'Renci.SshNet, Version=2016.0.0.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)</p>
<p>We'll stick with supporting the older algorithms for now, happy to test if you decide to upgrade the SSH.NET version in the future.</p>
<p>Thank you!</p></div>Christoffertag:help.appveyor.com,2012-11-13:Comment/580321722023-02-24T04:05:40Z2023-02-24T04:05:40ZCannot connect SFTP server: Failed to negotiate key exchange algorithm.<div><p>Or you can use WinSCP: <a href="https://help.appveyor.com/discussions/problems/33606-try-to-deploy-sftp-to-sourceforge-error-cannot-connect-sftp-server-failed-to-negotiate-key-exchange-algorithm">https://help.appveyor.com/discussions/problems/33606-try-to-deploy-...</a></p></div>Feodor Fitsner