0 votes
by (120 points)

Hi,
Right now I am using Rebex.Sftp library for my sftp server project(Asp.Net Core Console App), I am using .Net Core 2.0 version and my OS is Ubuntu 16.04.3 LTS. The project runs exception free in Windows environment, but when I tried to publish and run in my Linux system, the following exceptions popped up:

2018-04-05 14:15:12.081 ERROR FileServer(1)[8] SSH: Session 1: Error while processing packet SSHMSGPACKET32. Key exchange failed. Error: Rebex.30: Error while processing packet SSHMSGPACKET32. Key exchange failed. ---> Rebex.30: Key exchange failed. ---> System.TypeInitializationException: The type initializer for 'Rebex.b87f' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'Bcrypt.dll': The specified module or one of its dependencies could not be found.
(Exception from HRESULT: 0x8007007E)
at Rebex.
f9.e4(44& p0, String p1, String p2, UInt32 p3)
at Rebex.871d..ctor(a44c p0, UInt32 p1)
at Rebex.b87f.df()
at Rebex.b87f.44()
at Rebex.b87f.85()
at Rebex.b87f..ctor(a44c p0, String p1, Func2 p2) at Rebex._b87f..ctor(_a44c p0, CipherMode p1, Func2 p2)
at Rebex.b87f..cctor()
--- End of inner exception stack trace ---
at Rebex.
b87f.39(a44c p0, CipherMode p1)
at Rebex.Security.Cryptography.SymmetricKeyAlgorithm.5b(Boolean p0)
at Rebex.
45.ce()
at Rebex.
e0.3d()
at Rebex.
e0.66(df p0, 739c p1)
--- End of inner exception stack trace ---
at Rebex.
e0.66(df p0, 739c p1)
at Rebex.
eff2.f4(Int32 p0, Int32 p1)
--- End of inner exception stack trace ---
at Rebex.
eff2.f4(Int32 p0, Int32 p1)
at Rebex.
eff2.f4()
at Rebex.
eff2.b5(Int32 p0, Int32 p1, Int32 p2, Int32 p3, SocketException p4)
2018-04-05 14:15:12.141 ERROR FileServer(1)[8] Server: Session 1: Error: Rebex.
30: Error while processing packet SSHMSGPACKET32. Key exchange failed. ---> Rebex.30: Key exchange failed. ---> System.TypeInitializationException: The type initializer for 'Rebex.b87f' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'Bcrypt.dll': The specified module or one of its dependencies could not be found.
(Exception from HRESULT: 0x8007007E)
at Rebex.f9.e4(44& p0, String p1, String p2, UInt32 p3)
at Rebex.
871d..ctor(a44c p0, UInt32 p1)
at Rebex.
b87f.df()
at Rebex.
b87f.44()
at Rebex.
b87f.85()
at Rebex.
b87f..ctor(a44c p0, String p1, Func2 p2) at Rebex._b87f..ctor(_a44c p0, CipherMode p1, Func2 p2)
at Rebex.
b87f..cctor()
--- End of inner exception stack trace ---
at Rebex.b87f.39(a44c p0, CipherMode p1)
at Rebex.Security.Cryptography.SymmetricKeyAlgorithm.
5b(Boolean p0)
at Rebex.45.ce()
at Rebex.e0.3d()
at Rebex.e0.66(df p0, _739c p1)
--- End of inner exception stack trace ---
at Rebex.
e0.66(df p0, 739c p1)
at Rebex.
eff2.f4(Int32 p0, Int32 p1)
--- End of inner exception stack trace ---
at Rebex.
eff2.f4(Int32 p0, Int32 p1)
at Rebex.
eff2.f4()
at Rebex.
eff2._b5(Int32 p0, Int32 p1, Int32 p2, Int32 p3, SocketException p4)

So could you please provide some workaround to resolve this?

Applies to: Rebex SFTP

1 Answer

0 votes
by (147k points)

Hi, we have just released Rebex SFTP 2018 R1 that fixes this issue. Please give it a try and let us know whether it works.

by (120 points)
Thank you very much for providing the workaround. Now it works fine.
...