+1 vote
by (350 points)

I am not able to connect to the SFTP server. I am getting the error messages as "Rebex.Net.SftpException: Key exchange failed. Requested service is not implemented. ---> Rebex.Net.SshException: Key exchange failed. Requested service is not implemented."

But when I connect using the FileZilla FTP client it works fine. Could you please help me out on this.

Many Thanks

Applies to: Rebex SFTP

1 Answer

0 votes
by (72.7k points)
edited by

The error is most likely caused by a mismatch between the form of Diffie-Hellman group exchange used by the client and the server. The old Rebex client uses the legacy form that was prevalent in early days of the SSH protocol (even as late as 2010, legacy form was the only form supported by some servers), but the server you are connecting to insists on using the standard form which is prevalent now. Historically, many servers supported both forms, but it looks like some SSH servers have recently started rejecting clients using the legacy form.

Possible solutions:

  1. Set Sftp object's Settings.SshParameters.UseLegacyGroupExchange property to false (only available in Rebex SFTP 2017 R6.2 and later).

  2. Upgrade to a recent version of Rebex SFTP. To make sure it resolves the issue, try the free 30-day trial first.

by (3.9k points)
You are using Rebex SFTP Version 2012 R3 , which is 5 years old. Can you please try connecting with the current version? You can download the trial  from http://www.rebex.net/sftp.net/download.aspx and try connecting using its SftpWinFormClient sample.
by
I have updated to the latest Rebex SFTP  but i'm still getting same error "Key exchange failed. Requested service is not implemented." any help?
by (147k points)
Please create a log using Sftp object's LogWriter property (as described at https://www.rebex.net/kb/logging/) and either post it here or mail it to support@rebex.net for analysis. Thanks!
by
I am getting a similar error, "Negotiation failed. Requested service is not implemented."
It's actually been intermittent, it failed last week. Started working again for a few days, then failed again this morning.
I was on 2018 R1.1.  I tried updating to R3 with the same problem.  I'm including logs from 1.1 and 3

2018-10-26 10:04:13.255 Opening log file.
2018-10-26 10:04:13.257 INFO FileLogWriter(1)[13] Info: Assembly: Rebex.Common 2018 R1.1 for .NET 4.0-4.7
2018-10-26 10:04:13.272 INFO FileLogWriter(1)[13] Info: Platform: Windows 6.1.7601 32-bit; CLR: 4.0.30319.42000
2018-10-26 10:04:13.272 DEBUG FileLogWriter(1)[13] Info: Culture: en; Windows-1252
2018-10-26 10:04:13.291 INFO Sftp(1)[13] Info: Connecting to SFTP.RENOWN.ORG:22 using Sftp.
2018-10-26 10:04:13.291 INFO Sftp(1)[13] Info: Assembly: Rebex.Sftp 2018 R1.1 for .NET 4.0-4.7
2018-10-26 10:04:13.291 INFO Sftp(1)[13] Info: Platform: Windows 6.1.7601 32-bit; CLR: 4.0.30319.42000
2018-10-26 10:04:13.291 DEBUG Sftp(1)[13] Info: Culture: en; Windows-1252
2018-10-26 10:04:13.307 DEBUG ProxySocket(1)[13] Proxy: Resolving 'SFTP.RENOWN.ORG'.
2018-10-26 10:04:13.311 DEBUG ProxySocket(1)[13] Proxy: Connecting to 204.115.221.12:22 (no proxy).
2018-10-26 10:04:13.401 DEBUG Sftp(1)[13] SSH: Server is 'SSH-2.0-7.7.1.0_openssh Please call support'.
2018-10-26 10:04:13.410 INFO Sftp(1)[13] SSH: Negotiation started.
2018-10-26 10:04:13.606 DEBUG Sftp(1)[13] SSH: Group exchange (legacy form).
2018-10-26 10:04:13.654 ERROR Sftp(1)[12] SSH: Error occured while receiving SSH packet: Rebex.Net.SshException: Requested service is not implemented.
   at Rebex.Net.SshSession.edof(Byte[] adq, Int32 adr, Int32 ads)
   at Rebex.Net.SshSession.edoe(Byte[] adn, Int32 ado, Int32 adp)
   at Rebex.Net.SshSession.edod()
   at Rebex.Net.SshSession.muoc.edpb()
2018-10-26 10:04:13.656 ERROR Sftp(1)[13] SSH: Negotiation failed. Requested service is not implemented.
2018-10-26 10:04:13.657 ERROR Sftp(1)[13] Info: Rebex.Net.SshException: Requested service is not implemented. ---> Rebex.Net.SshException: Requested service is not implemented.
   at Rebex.Net.SshSession.edof(Byte[] adq, Int32 adr, Int32 ads)
   at Rebex.Net.SshSession.edoe(Byte[] adn, Int32 ado, Int32 adp)
   at Rebex.Net.SshSession.edod()
   at Rebex.Net.SshSession.muoc.edpb()
   --- End of inner exception stack trace ---
   at Rebex.Net.SshSession.edny()
   at Rebex.Net.SshSession.edoa[a,b](bckp`2 adh, Int32 adi, bckq adj, b adk, a adl, a adm)
   at Rebex.Net.SshSession.edoh(murh adv)
   at murl.pvue(SshSession awy, Byte[] awz, Byte[] axa, Byte[] axb, Byte[] axc, murb& axd, Byte[]& axe, SshPublicKey& axf)
   at Rebex.Net.SshSession.edoj(Byte[] adw)
   at Rebex.Net.SshSession.Negotiate()
   at Rebex.Net.Sftp.yynz.cqmt(cfxh ame, Boolean amf)
   at Rebex.Net.Sftp.lshv(String qi, Int32 qj, SshParameters qk, cfxh ql)






2018-10-26 10:42:15.121 Opening log file.
2018-10-26 10:42:15.125 INFO FileLogWriter(1)[15] Info: Assembly: Rebex.Common 2018 R3 for .NET 4.0-4.7
2018-10-26 10:42:15.127 INFO FileLogWriter(1)[15] Info: Platform: Windows 6.1.7601 32-bit; CLR: 4.0.30319.42000
2018-10-26 10:42:15.127 DEBUG FileLogWriter(1)[15] Info: Culture: en; Windows-1252
2018-10-26 10:42:15.144 INFO Sftp(1)[15] Info: Connecting to SFTP.RENOWN.ORG:22 using Sftp.
2018-10-26 10:42:15.144 INFO Sftp(1)[15] Info: Assembly: Rebex.Sftp 2018 R3 for .NET 4.0-4.7
2018-10-26 10:42:15.144 INFO Sftp(1)[15] Info: Platform: Windows 6.1.7601 32-bit; CLR: 4.0.30319.42000
2018-10-26 10:42:15.144 DEBUG Sftp(1)[15] Info: Culture: en; Windows-1252
2018-10-26 10:42:15.155 DEBUG Sftp(1)[15] Proxy: Resolving 'SFTP.RENOWN.ORG'.
2018-10-26 10:42:15.158 DEBUG Sftp(1)[15] Proxy: Connecting to 204.115.221.12:22 (no proxy).
2018-10-26 10:42:15.243 DEBUG Sftp(1)[15] SSH: Server is 'SSH-2.0-7.7.1.0_openssh Please call support'.
2018-10-26 10:42:15.250 INFO Sftp(1)[15] SSH: Negotiation started.
2018-10-26 10:42:15.421 DEBUG Sftp(1)[15] SSH: Group exchange (legacy form).
2018-10-26 10:42:15.464 ERROR Sftp(1)[21] SSH: Error occured while receiving SSH packet: Rebex.Net.SshException: Requested service is not implemented.
   at Rebex.Net.SshSession.fmkq(Byte[] agf, Int32 agg, Int32 agh)
   at Rebex.Net.SshSession.fmkp(Byte[] agc, Int32 agd, Int32 age)
   at Rebex.Net.SshSession.fmko()
   at Rebex.Net.SshSession.itzj.fmlm()
2018-10-26 10:42:15.466 ERROR Sftp(1)[15] SSH: Negotiation failed. Requested service is not implemented.
2018-10-26 10:42:15.468 ERROR Sftp(1)[15] Info: Rebex.Net.SshException: Requested service is not implemented. ---> Rebex.Net.SshException: Requested service is not implemented.
   at Rebex.Net.SshSession.fmkq(Byte[] agf, Int32 agg, Int32 agh)
   at Rebex.Net.SshSession.fmkp(Byte[] agc, Int32 agd, Int32 age)
   at Rebex.Net.SshSession.fmko()
   at Rebex.Net.SshSession.itzj.fmlm()
   --- End of inner exception stack trace ---
   at Rebex.Net.SshSession.fmkj()
   at Rebex.Net.SshSession.fmkl[b,c](lcyp`2 afw, Int32 afx, lcyq afy, c afz, b aga, b agb)
   at Rebex.Net.SshSession.fmks(iuco agk)
   at iucs.xoag(SshSession azr, Byte[] azs, Byte[] azt, Byte[] azu, Byte[] azv, iuci& azw, Byte[]& azx, SshPublicKey& azy)
   at Rebex.Net.SshSession.fmku(Byte[] agl)
   at Rebex.Net.SshSession.Negotiate()
   at Rebex.Net.Sftp.srhy.frfl(nnui alr, Boolean als)
   at Rebex.Net.Sftp.xhez(String po, Int32 pp, SshParameters pq, nnui pr)
by (147k points)
edited by
This error occurred after our SSH client tried to start a legacy form of Diffie-Hellman group exchange, which seems strange, because the server seems to be modern.
Are you setting Sftp object’s Settings.SshParameters.UseLegacyGroupExchange in your code?
In any case, please try setting that property to false before calling Sftp.Connect and if it still fails, please create and post an updated log.
...