0 votes
by (160 points)

I am trying to connect using sftp and getting following error :

04:40:33.502 Info Info: Connecting to sftp.someftplocation.com:22 using Sftp 2.0.3333.0.
04:40:33.928 Error SSH: System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
at System.Security.Cryptography.RijndaelManaged..ctor()
at Rebex.Net.TransportKexInit.GetSymmetricAlgorithm(String alg, SshEncryptionAlgorithm& cipher, Int32& bits)
at Rebex.Net.SshSession.Negotiate(Byte[] I_S)
at Rebex.Net.SshSession.ConnectInner()
at Rebex.Net.SshSession.Negotiate()

Could anyone help us what would be the reason, we have verified that the credentials are correct and are able to connect the same ftp using web.

Applies to: Rebex SFTP

1 Answer

+1 vote
by (58.9k points)
Best answer

It looks like you are running rather old version (3333) of the Rebex Sftp client on a Windows machine running in FIPS mode. Actually, we first added the support for FIPS in version 3428. So please try to update to the latest version and let us know whether the problem is resolved.

I have checked our system and was able to locate an expired support contract of your company which entitles you to download version 2014R1. So please download it and let us know if the problem is solved.

If for some reason you are unable to update to the newer version which automatically supports FIPS mode, please let us know and we will provide a workaround (this would be to turn off the AES algorithm).

by (160 points)

Updated with 2014R1, copied libraries to a folder from netcf-2.0 and referenced in my project. Am i referencing the right dll's

by (58.9k points)

As your original question was related to FIPS mode which is not even available on .NET Compact Framework, I think that you chose the wrong assemblies. Please try referencing either these from "net-2.0" or "net-4.0" based on the version of .NET Framework that you are targetting (see table below).

The assemblies from "netcf-2.0" are actually meant for .NET Compact Framework 2.0 (on PocketPC's, Windows Mobile and Windows CE devices).

For complete information, here is a list of available Rebex SFTP sets of assemblies in version 2014R1:

net-2.0         - binaries for .NET 2.0, .NET 3.0, .NET 3.5 and Mono
net-4.0         - binaries for .NET 4.0, .NET 4.5 and Mono
netcf-2.0       - binaries for .NET Compact Framework 2.0
netcf-3.5       - binaries for .NET Compact Framework 3.5
netcf-3.9       - binaries for .NET Compact Framework 3.9
xamarin.android - binaries for Xamarin.Android
xamarin.ios     - binaries for Xamarin.iOS

(The above list can also be found in 'platforms.txt' file from the installed product).

by (160 points)

Using net-4.0 i am getting following build error :

Error 1
'Rebex.Net.Sftp' does not contain a definition for 'BeginConnect' and no extension method 'BeginConnect' accepting a first argument of type 'Rebex.Net.Sftp' could be found (are you missing a using directive or an assembly reference?)

Do i really need a code change for updated dll's ?

by (58.9k points)

This can be solved by importing the Rebex.Legacy namespace:

using Rebex.Legacy;

We usually try to avoid breaking changes, but sometimes it cannot be worked around (as with the introduction of Task Based Asynchronous Pattern in version 2012R3 you came accross).

See more info why this is needed at http://www.rebex.net/kb/upgrading-to-2012-r3/default.aspx

Sorry for inconvenience!

by (160 points)

Ok.. it worked, thanks for the help Tomas. I really appreciate that.