I'm trying to implement your SFTP .NET library on a Windows Mobile 2003 rugged device with compact framework 2.0 (Intermec 761)
and i keep getting the error 'Negotiation failed.' when trying to connect.
I already searched along your forum for similar questions but i couldn't reach a solution.
I can confirm that:
* The device has compact framework 2.0 (2.0.7045.0).
* I'm using your very simple sample to get a list of files from the SFTP server (SftpFileListCFCS).
* The server i'm using is your REBEX tiny SFTP Server.
* The OS image installed on this device has a "Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider" CSP provider implementation
(Checked registry key "HKEYLOCAL_MACHINE\Comm\Security\Crypto\Defaults\Provider").
Below is the FileLogWriter generated on the device:
2016-05-16 12:27:56 Opening log file.
2016-05-16 12:27:56 Using FileLogWriter version 2.0.5885.0.
2016-05-16 12:27:57 INFO Sftp(1)[-1756489614] Info: Connecting to XXX.XXX.XXX.XXX:22 using Sftp 3.0.5885.0.
2016-05-16 12:27:58 DEBUG Sftp(1)[-1756489614] SSH: Server is 'SSH-2.0-RebexSSH_1.0.0.30631'.
2016-05-16 12:27:58 INFO Sftp(1)[-1756489614] SSH: Negotiation started.
2016-05-16 12:27:58 ERROR Sftp(1)[-1756489614] SSH: Negotiation failed. Unable to acquire RSA_AES CSP context (-2146893799).
2016-05-16 12:27:59 ERROR Sftp(1)[-1756489614] Info: Rebex.Net.SshException: Negotiation failed. ---> System.Security.Cryptography.CryptographicException: Unable to acquire RSA_AES CSP context (-2146893799).
em Rebex.Security.Cryptography.OC.JP()
em Rebex.Security.Cryptography.ZR.get_VP()
em Rebex.Security.Cryptography.HashingAlgorithm.IsSupported()
em Rebex.Net.LXG..ctor()
em Rebex.Net.SshSession.VN()
em Rebex.Net.SshSession.Negotiate()
at YGV.VN()
em Rebex.Net.Sftp.ND()
em Rebex.Net.Sftp.CU()
em Rebex.Net.Sftp.Connect()
em Rebex.Samples.Screen.GetFtpList()
em Rebex.Samples.Screen.listBtn_Click()
em System.Windows.Forms.Control.OnClick()
em System.Windows.Forms.Button.OnClick()
em System.Windows.Forms.ButtonBase.WnProc()
em System.Windows.Forms.Control._InternalWnProc()
em Microsoft.AGL.Forms.EVL.EnterMainLoop()
em System.Windows.Forms.Application.Run()
em Rebex.Samples.Screen.Main()
em Rebex.Net.SshSession.VN()
em Rebex.Net.SshSession.Negotiate()
at YGV.VN()
em Rebex.Net.Sftp.ND()
em Rebex.Net.Sftp.CU()
em Rebex.Net.Sftp.Connect()
em Rebex.Samples.Screen.GetFtpList()
em Rebex.Samples.Screen.listBtn_Click()
em System.Windows.Forms.Control.OnClick()
em System.Windows.Forms.Button.OnClick()
em System.Windows.Forms.ButtonBase.WnProc()
em System.Windows.Forms.Control._InternalWnProc()
em Microsoft.AGL.Forms.EVL.EnterMainLoop()
em System.Windows.Forms.Application.Run()
em Rebex.Samples.Screen.Main()