This article describes the solution for the error 'Unable to negotiate with x.x.x.x: no matching host key type found. Their offer:' When trying to connect to the FortiSwitch from FortiGate or other external resources via SSH.
FortiSwitch v7.6.1.
After upgrading FortiSwitch to v7.6.1, it is possible that SSH keys need to be regenerated.
Issue:
Cannot manage FSW via SSH
FortiSwitch is Authorized/Up on switch-controller:
FortiSwitch is Authorized/Up on switch-controller
Solution:
Regenerate SSH keys by executing this command on FortiSwitch CLI. Note that this command must be executed via console port (baud rate 115200):
exec ssh-regen-keys
FortiSwitch CLI (connected via console port)
Then try again to access the FortiSwitch via SSH from FortiGate or any other SSH client; the issue should be resolved:
Accept the new key generated.
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2026 Fortinet, Inc. All Rights Reserved.