no matching cipher found
Posted: Wed 22 Nov 2017 08:58
Hi,
I am getting occasional errors like "no matching cipher found", "Invalid Key Exchange Algorithm" and "Invalid Hash Algorithm" however the usual causes for this do not seem to apply. Here is my configuration and setup on the SSH Server and in my ScSSHClient;
Sshd_config
…
Ciphers blowfish-cbc,aes256-ctr,aes256-cbc,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,cast128-cbc,3des-cbc
HostKeyAlgorithms ssh-rsa,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-dss
KexAlgorithms ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1
MACs hmac-sha2-256,hmac-sha2-512,hmac-sha1
Ssh –vv localhost
debug2: KEX algorithms: ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1
debug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ssh-dss,ecdsa-sha2-nistp256
debug2: ciphers ctos: blowfish-cbc,aes256-ctr,aes256-cbc,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,cast128-cbc,3des-cbc
debug2: ciphers stoc: blowfish-cbc,aes256-ctr,aes256-cbc,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,cast128-cbc,3des-cbc
debug2: MACs ctos: hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: hmac-sha2-256,hmac-sha2-512,hmac-sha1
ScSSHClient
Client Ciphers blowfish-cbc,aes256-ctr,aes256-cbc,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,cast128-cbc,3des-cbc
Server Ciphers blowfish-cbc,aes256-ctr,aes256-cbc,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,cast128-cbc,3des-cbc
HMACAlgorithms hmac-sha1,hmac-sha2-256,hmac-sha2-512
HostKeyAlgorithms ssh-rsa
KeyExchangeAlgorithms ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
As you can see there are matching ciphers and algorithms on the server and client and yet sometimes, for reason I can fathom these errors occur.
Example;
Auth.log
Nov 21 16:48:30 DCDB1 sshd[18109]: fatal: Unable to negotiate with X.X.X.X port 64672: no matching cipher found. Their offer: ,aes256-ctr,aes256-cbc
,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,cast128-cbc,3des-cbc [preauth]
Notice that the cipher list is exactly the same with the exception that there is no blowfish-cdc listed at the beginning of the “Their offer” list.
My server: OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g 1 Mar 2016
Can anyone shed some light on why this is happening?
I am getting occasional errors like "no matching cipher found", "Invalid Key Exchange Algorithm" and "Invalid Hash Algorithm" however the usual causes for this do not seem to apply. Here is my configuration and setup on the SSH Server and in my ScSSHClient;
Sshd_config
…
Ciphers blowfish-cbc,aes256-ctr,aes256-cbc,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,cast128-cbc,3des-cbc
HostKeyAlgorithms ssh-rsa,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-dss
KexAlgorithms ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1
MACs hmac-sha2-256,hmac-sha2-512,hmac-sha1
Ssh –vv localhost
debug2: KEX algorithms: ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1
debug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ssh-dss,ecdsa-sha2-nistp256
debug2: ciphers ctos: blowfish-cbc,aes256-ctr,aes256-cbc,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,cast128-cbc,3des-cbc
debug2: ciphers stoc: blowfish-cbc,aes256-ctr,aes256-cbc,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,cast128-cbc,3des-cbc
debug2: MACs ctos: hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: hmac-sha2-256,hmac-sha2-512,hmac-sha1
ScSSHClient
Client Ciphers blowfish-cbc,aes256-ctr,aes256-cbc,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,cast128-cbc,3des-cbc
Server Ciphers blowfish-cbc,aes256-ctr,aes256-cbc,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,cast128-cbc,3des-cbc
HMACAlgorithms hmac-sha1,hmac-sha2-256,hmac-sha2-512
HostKeyAlgorithms ssh-rsa
KeyExchangeAlgorithms ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
As you can see there are matching ciphers and algorithms on the server and client and yet sometimes, for reason I can fathom these errors occur.
Example;
Auth.log
Nov 21 16:48:30 DCDB1 sshd[18109]: fatal: Unable to negotiate with X.X.X.X port 64672: no matching cipher found. Their offer: ,aes256-ctr,aes256-cbc
,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,cast128-cbc,3des-cbc [preauth]
Notice that the cipher list is exactly the same with the exception that there is no blowfish-cdc listed at the beginning of the “Their offer” list.
My server: OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g 1 Mar 2016
Can anyone shed some light on why this is happening?