Technical Tip: How to delete the ssh-known-hosts for Devices that use custom ports
| Description | This article describes how to delete the ssh-known-hosts for Devices that use custom ports integrated with FortiNAC. |
| Scope | FortiNAC-F v7.6.3 and greater. |
| Solution | The GUI 'Clear Known Host' feature does not correctly handle hosts using non-default SSH ports (e.g., 2222). Although the command returns a successful status, the known host entry remains unchanged.
Verify the following information in the FortiNAC CLI:
NTYAAABBBFrI2LuZz+6EFUYnAdD1UgrDQ9cJF2+A+JzGou1DmYK4zxZmJw SKLki2PDHSc8wKKZAlgba8Kec1DYx8XjbwDU4=
[192.168.1.1]:2222 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTY AAAAIbmlzdHAyNTYAAABBBL6a6NdBAMRuEVcH2uwAvYPTZOuPavGVjjgooRyPR/Oaayu7y 8hPCLWSSSGYIRvxI8yf7S8nmwsF4WUbu5eqO8c=
FortiNAC_CLI:~$ sudo /bsc/campusMgr/bin/internal/knownHosts remove <username> [<host>]:<port> For example:
FortiNAC_CLI # execute ssh-known-hosts show nac BBFrI2LuZz+6EFUYnAdD1UgrDQ9cJF2+A+JzGou1DmYK4zxZmJwSKLki2PDHSc8wKKZAlgba8Kec1DYx8XjbwDU4= |


