Skip to main content
sjoshi
Staff
Staff
October 4, 2024

Technical Tip: Access to FortiSwitch CLI console via FortiGate

  • October 4, 2024
  • 0 replies
  • 13014 views
Description

 

This article describes how to access and manage the FortiSwitch CLI through the FortiGate GUI, enabling seamless configuration and troubleshooting of FortiSwitches without needing direct console access.

 

Scope

 

FortiGate, FortiSwitch.

 

Solution

 

Prerequisites:

  • Before accessing the FortiSwitch CLI via FortiGate, ensure the following prerequisites are met:
  • FortiSwitch is connected and managed by FortiGate.
  • Admin access to the FortiGate is required
  • Proper network connectivity between FortiGate and FortiSwitch.

 

  1.  Log in to FortiGate GUI: Access the FortiGate GUI with the admin credentials.
  2.  Navigate to Wifi & Switch Controller: Go to Wifi & Switch Controller -> Managed FortiSwitches.

 

1a.PNG

 

  1. Identify the FortiSwitch: In the Managed FortiSwitches list, locate the desired FortiSwitch, 'right-click' on it, and select 'Connect to CLI'.

 

2a.PNG

 

  1. Access the CLI: Once the correct credentials for FortiSwitch are entered, access to the FortiSwitch CLI will be granted.

 

4.PNG

 

  1.  Execute Commands: FortiSwitch CLI commands can now be entered and executed as if directly connected to the FortiSwitch.

 

5.PNG

 

If FortiSwitch is managed using CAPWAP, it is possible to SSH to it using its DNS register after the switch gets authorized. This is performed by calling the SSH function but using the domain '.fsw' after the Switch-Id or name as follows:

 

execute ssh <user>@<FortiSwitch ID or name>.fsw

 

Note: This method can only be used when FortiSwitch is managed using CAPWAP. If HTTPS is used, the DNS record will not be created, and therefore, only SSH via IP will be accessible.

 

Example:

 

SSH to the FortiSwitch using DNS domainSSH to the FortiSwitch using DNS domain