Skip to main content
jiahoong112
Staff
Staff
January 10, 2024

Technical Tip: Check the SSH encryption algorithm used on FortiGate using Nmap

  • January 10, 2024
  • 0 replies
  • 4770 views
Description

This article describes how to check the SSH encryption algorithm on FortiGate using Nmap on Windows.

Scope

Any version of FortiGate.

Solution

Download the ssh2-enum-algos script. 'Right-click' on the download link and select 'Save Link As'.

It will then be necessary to copy/paste this script into the nselibs folder of the NMap application. On Windows, paste the script into the following directory.

 

Example file path: C:\Program Files (x86)\Nmap\nselib

To test this, enable SSH on the FortiGate’s interface:

 

jiahoong112_0-1704865582349.png

 

On the Nmap application GUI, run this command to test:

 

nmap --script ssh2-enum-algos x.x.x.x  <-----  x.x.x.x is the FortiGate interface IP where the SSH has been enabled and wants to test.

 

The output should look like this:

 

jiahoong112_1-1704865582355.png

 

To only use certain encryption algorithms for SSH:

  • In this situation, specify FortiGate to only use aes256-ctr. Here are the results on Nmap with regard to that:

 

jiahoong112_2-1704865582362.png

 

 

This is how the Nmap results look like if SSH is Disabled on the interface. No results returned:

 

jiahoong112_3-1704865582365.png
Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!