Couldn't agree a key host algorithm (available rsa-sha2-512, rsa-sha2-256)

Advertisement

Piscator
Joined:
Posts:
2

Couldn't agree a key host algorithm (available rsa-sha2-512, rsa-sha2-256)

I am using the latest version (5.19.6) and WinSCP is giving me this error. I use the key via Pageant (ssh-rsa 2048) and connecting via PuTTY (0.76.0.20220214) works fine. Suggestions?

Reply with quote

Advertisement

ogbonnaebuka@...
Guest

Re: Cannot upgrade WinSCP

I am having the same issue with error text "Couldn't agree a host key algorithm (available: ecdsa-sha2-nistp256)". I am at version 5.7.7, but unfortunately I cannot upgrade as WinSCP is running on a remote Windows server which is not allowed to access the internet.

What would you advise in my case?

Thanks in advance.

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Cannot upgrade WinSCP

@ogbonnaebuka: Well, you need to upgrade. There has to be a way to update software on the remote machine, right? Only other option to reconfigure your SFTP server to allow older deprecated algorithms (obviously, not a good solution).

Reply with quote

Sivakumar
Joined:
Posts:
1

Even in latest version same issue occurs

I am using WinSCP version 6.3.6, In this version also I am getting the "Couldn't agree a key host algorithm (available rsa-sha2-512, rsa-sha2-256)" issue.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,837
Location:
Prague, Czechia

Re: Even in latest version same issue occurs

@Sivakumar: Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Advertisement

steph_og
Joined:
Posts:
4
Location:
Thailand

Thanks for your response. I appreciate it. I have upgraded already but not sure why the logs still shows that version? I have also generated a new PuTTY using the newest version but still have the same error as below:
2025-03-20 14:53:36.854 Connecting to 13.54.5.193 port 22000
. 2025-03-20 14:53:36.854 We claim version: SSH-2.0-WinSCP_release_5.17.9
. 2025-03-20 14:53:36.870 Remote version: SSH-2.0-AWS_SFTP_1.1
. 2025-03-20 14:53:36.870 Using SSH protocol version 2
. 2025-03-20 14:53:36.870 Have a known host key of type rsa2
. 2025-03-20 14:53:36.886 Couldn't agree a host key algorithm (available: rsa-sha2-512,rsa-sha2-256)
. 2025-03-20 14:53:36.886 Attempt to close connection due to fatal exception:
* 2025-03-20 14:53:36.886 Couldn't agree a host key algorithm (available: rsa-sha2-512,rsa-sha2-256)
. 2025-03-20 14:53:36.886 Closing connection.
I am just a newbie trying to support the client and would appreciate any help and insights. thank you!

2025-03-20_12-29-41.png

Reply with quote

martin
Site Admin
martin avatar

@steph_og: You probably have more copies of WinSCP on the machine. Possibly one installed and other just a copy of a binary (or portable package). You have upgraded the installed copy, but you are actually using other copy. How are you starting WinSCP?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,837
Location:
Prague, Czechia

What is "normal startup from the Menu"? Do you mean Windows "Start" menu? Did you check where does the menu shortcut point to? (right-click "WinSCP" menu entry and select "Open file location")

Did you verify that the installer is installing the new version to the same location? You can see the target path here:
https://winscp.net/eng/docs/ui_installer_ready

Reply with quote

steph_og
Joined:
Posts:
4
Location:
Thailand

Hi @martin,

Here is the location from the Start Menu:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs
Here is from the Desktop Shortcut:
C:\Program Files (x86)\WinSCP
- They point me to the same screen and application

and the installer says here:
This PC > Windows (C:) > Program Files (x86) > WinSCP

Should I just upgrade to 6.3.7?
Please feel free to reach out where i can contact you

Thanks.

Reply with quote

Advertisement

You can post new topics in this forum