FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
johnathan
Staff
Staff
Article Id 271865
Description

This article describes that when trying to SSH from the FortiGate, the following error message: 'Unable to negotiate with 169.254.0.1: no matching cipher found' appears. The offer: chacha20-poly1305@openssh.com,aes256-ctr,aes256-gcm@openssh.com.

Scope

 FortiGate v6.x.x and v7.x.x.

Solution

This is an error that can occur if the available SSH ciphers have been modified, or if the device connected does not support secure ciphers. If a user tries to connect to a device that only supports insecure ciphers, this error will occur if ‘strong-crypto’ is enabled and there is no appropriate cipher allowed.

 

To view the ciphers which are available to the FortiGate to use, execute the following commands:

 

config system global
show full | grep ssh

 

johnathan_0-1693860987094.png

 

From the example above, there are chacha20-poly1305@openssh.com, aes256-ctr, and aes256-gcm currently enabled.

This is the default there is ‘strong-crypto’ enabled. If needed, it is possible to disable this option and choose an insecure cipher to add.

 

Below is a table outlining the ciphers available to the FortiGate, and whether or not they need 'strong-crypto':

 

‘strong-crypto’ setting

Supported ciphers

Enabled

chacha20-poly1305@openssh.com

aes256-ctr

aes256-gcm@openssh.com

 

Disabled

chacha20-poly1305@openssh.com

aes128-ctr

aes192-ctr

aes256-ctr

arcfour256

arcfour128

aes128-cbc

3des-cbc

blowfish-cbc

cast128-cbc

aes192-cbc

aes256-cbc

arcfour

rijndael-cbc@lysator.liu.se

aes128-gcm@openssh.com

aes256-gcm@openssh.com

 

If the device connected to requires ‘arcfour’ for example, it is possible to append it to the allowed ciphers list by executing ‘append ssh-enc-algo arcfour’. It will then, be possible to connect to the device.

 

This error can also occur when ‘ssh-kex-algo’ or ‘ssh-mac-algo’ requires modification, it will be the same steps as for ‘ssh-enc-algo’.

 

Refer to the following charts below for available ciphers:

 

‘strong-crypto’ setting

 ssh-kex-algo

Enabled

diffie-hellman-group-exchange-sha256

curve25519-sha256@libssh.org

ecdh-sha2-nistp256

ecdh-sha2-nistp384

ecdh-sha2-nistp521

 

Disabled

diffie-hellman-group14-sha1

diffie-hellman-group-exchange-sha1

diffie-hellman-group-exchange-sha256

curve25519-sha256@libssh.org

ecdh-sha2-nistp256

ecdh-sha2-nistp384

ecdh-sha2-nistp521

 

 ‘strong-crypto’ setting

ssh-mac-algo

Enabled

hmac-sha2-256

hmac-sha2-256-etm@openssh.com

hmac-sha2-512

hmac-sha2-512-etm@openssh.com

Disabled

hmac-md5

hmac-md5-etm@openssh.com

hmac-md5-96

hmac-md5-96-etm@openssh.com

hmac-sha1

hmac-sha1-etm@openssh.com

hmac-sha2-256

hmac-sha2-256-etm@openssh.com

Contributors