Couldn't Agree A Key Exchange Algorithm
Reply to SSH: Couldn't agree a key algorithm (available: curve25519-sha256@libssh.org) on Tue, 26 Jul 2016 11:15:36 GMT FYI- We disabled some older, weaker, ssh key exchange algorithms. It won't be uncommon to find some older programs that use ssh directly or via things like libssh, that will need to be updated.
- Diffie Hellman Encryption
- Git Couldn't Agree A Key Exchange Algorithm
- Couldn't Agree A Key Exchange Algorithm Pfsense
I have a device that accept the following exchange algorithms for SSH connections:
curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group14-sha256,kexguess2@matt.ucc.asn.au
I downloaded the latest version of Putty, and it says it supports: diffie-hellman group exchange, diffie-hellman group 14, diffie-hellman group 1 and RSA-based key exchange.
I guess it should work because in both configurations I see the diffie-hellman group 14. However, when I try to connect to the device I get the error:
1 Answer
Diffie Hellman Encryption
That's not the latest version of PuTTY. ECDH key exchange (including Curve25519) has been supported since 0.68 (February 2017), and the latest release as of writing this post is already 0.70 (July 2017).
Git Couldn't Agree A Key Exchange Algorithm
(The reason DH group-14 doesn't work is because PuTTY only supports it with SHA-1. In current versions, only DH group-exchange is supported with SHA-256.)
Alternatively, you could connect via OpenSSH (standard on Windows 10.1803) or Bitvise Tunnelier (compatible with Windows Vista+); both support all of the above mechanisms.
grawitygrawityCouldn't Agree A Key Exchange Algorithm Pfsense
Not the answer you're looking for? Browse other questions tagged sshencryptionputtyssh-keys or ask your own question.
I have a remote server with Ubuntu 12.04 installed.
I want to use PuTTY to establish connection, but I get a fatal error.
The information is show as below:
I have searched the solution by Google but failed. I just want to know how to solve it.
Jakujeclosed as off-topic by Pang, Boris Stitnicky, HaveNoDisplayName, greg-449, lokuskingSep 5 '16 at 7:19
This question appears to be off-topic. The users who voted to close gave this specific reason:
- 'Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming. You may be able to get help on Super User.' – Pang, Boris Stitnicky, HaveNoDisplayName, greg-449, lokusking
3 Answers
You should set up your ssh server to offer different host keys that are supported by putty or make putty accept this key type (update putty. It should support them).
On server side, you would need to generate the keys and set up in the /etc/ssh/sshd_config
option HostKey
pointing to them and make sure the key type is also available in option HostKeyAlgorithms
.
I was getting exactly the same error from putty after upgrading an Ubuntu server from 14.04.1 to 16.04.1. The version of putty I was using was the latest recommended version 0.67, however I solved my issue by using the latest development snapshot version (snapshot 2016-08-30.bf00bcd at the time of writing this).
In my case, putty wanted an RSA host key.
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
Then un-comment the line that refers to that file in /etc/ssh/sshd_config, and restart sshd.