WinSCPnet.dll with WinScp632 give does not match pattern error

Advertisement

bpacilio59
Joined:
Posts:
8

WinSCPnet.dll with WinScp632 give does not match pattern error

Hi, I have a Visual C++ program that has been in use for years. It has embedded calls to WinSCP functions. I currently use WinSCP version 5.7.7. I package the WinSCP.exe and WinSCPnet.dll with the delivery and have them both in the same location. The program connects to a Linux server. All has been working well for years but now the server was upgraded to Red Hat 8 and I get a "Couldn't agree on a host key algorithm" message. According to research the only way to fix this is to upgrade WinSCP. I've downloaded and placed the WinSCP.exe and WinSCPnet.dll (version 6.3.2) in the same location as the old one. I can run WinSCP.exe and can not connect to the server, however, my program which uses the DLL can not connect. The error I get is that it does not like the pattern of the new key fingerprint. It wants it to start with ssh-rsa or ssh-dss but the new fingerprint generated when I run WinSCP.exe starts with edcsa-sha2.... I downloaded the WinSCP-6.3.2-Automation.zip file and used the file in the main directory. Not sure what is going on

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,567
Location:
Prague, Czechia

Re: WinSCPnet.dll wtith WinScp632 give does not match pattern error

It would help, if you post exact and complete error message. Or even better a debug log file (Session.DebugLogPath).
In general, it looks like you didn't actually update the WinSCP .NET assembly DLL and you are trying to use up-to-date host key format from current version of WinSCP with an old version of WinSCP .NET assembly.

Reply with quote

bpacilio59
Joined:
Posts:
8

Re: WinSCPnet.dll wtith WinScp632 give does not match pattern error

What your saying makes sense but it's been a while since I had to modify this program. It's written in Visual Studio 2008 and does not respond well when I tried to port it. I have a directory structure like this: Projects->TSMT. In here I have three directories of note, Release, Debug, and WinScp. I've placed the DLL and exe file in each of these. Before I put the updated files in the WindScp directory I get the first message when I try to log in from my program. After the files in WinScp are updated I get the second message. I updated the DLL a few times in the past and did not have an issued. I'm assuming I forgot how I did it.[

Reply with quote

martin
Site Admin
martin avatar

Re: WinSCPnet.dll wtith WinScp632 give does not match pattern error

So isn't the problem that the current version of .NET assembly now targets .NET framework 4?
The 5.13.9 was the last version that didn't need .NET 4. Try it, maybe it is compatible with your server.

Reply with quote

bpacilio59

Re: WinSCPnet.dll wtith WinScp632 give does not match pattern error

Thank You. Using 5.13.9 solved the immediate issue. I checked my .NET directory (Windows 10) and it has .NET version 4.0.30319 installed, however, am stuck using Visual Studio 2008 for this project and it appears that it will not support the 4.0 framework. Thanks again.

Reply with quote

Advertisement

You can post new topics in this forum