Connecting to the CLI
You can use a direct console connection or SSH to connect to the FortiManager CLI.
Connecting to the FortiManager console
To connect to the FortiManager console, you need:
- a computer with an available communications port
- a console cable, provided with your FortiManager unit, to connect the FortiManager console port and a communications port on your computer
- terminal emulation software, such as HyperTerminal for Windows.
![]() |
The following procedure describes how to connect to the FortiManager CLI using Windows HyperTerminal software. You can use any terminal emulation program. |
To connect to the CLI:
- Connect the FortiManager console port to the available communications port on your computer.
- Make sure the FortiManager unit is powered on.
- Start HyperTerminal, enter a name for the connection, and select OK.
- Configure HyperTerminal to connect directly to the communications port on the computer to which you have connected the FortiManager console port.
- Select OK.
- Select the following port settings and select OK.
COM port
COM1
Bits per second
115200
Data bits
8
Parity
None
Stop bits
1
Flow control
None
- Press
Enter
to connect to the FortiManager CLI.The login prompt appears.
- Enter a valid administrator name and press
Enter
. - Enter the password for this administrator and press
Enter
.You have connected to the FortiManager CLI, and you can enter CLI commands.
Setting administrative access on an interface
To perform administrative functions through a FortiManager network interface, you must enable the required types of administrative access on the interface to which your management computer connects. Access to the CLI requires Secure Shell (SSH) access. If you want to use the GUI, you need HTTPS access.
To use the GUI to configure FortiManager interfaces for SSH access, see the FortiManager Administration Guide.
To use the CLI to configure SSH access:
- Connect and log into the CLI using the FortiManager console port and your terminal emulation software.
- Use the following command to configure an interface to accept SSH connections:
config system interface
edit <interface_name>
set allowaccess <access_types>
end
Where
<interface_name>
is the name of the FortiManager interface to be configured to allow administrative access, and<access_types>
is a whitespace-separated list of access types to enable.For example, to configure port1 to accept HTTPS and SSH connections, enter:
config system interface
edit port1
set allowaccess https ssh
end
Remember to press
Enter
at the end of each line in the command example. Also, typeend
and pressEnter
to commit the changes to the FortiManager configuration. - To confirm that you have configured SSH access correctly, enter the following command to view the access settings for the interface:
get system interface <interface_name>
The CLI displays the settings, including the management access settings, for the named interface.
Connecting to the FortiManager CLI using SSH
SSH provides strong secure authentication and secure communications to the FortiManager CLI from your internal network or the internet. Once the FortiManager unit is configured to accept SSH connections, you can run an SSH client on your management computer and use this client to connect to the FortiManager CLI.
![]() |
A maximum of 5 SSH connections can be open at the same time. |
To connect to the CLI using SSH:
- Install and start an SSH client.
- Connect to a FortiManager interface that is configured for SSH connections.
- Enter a valid administrator name and press
Enter
. - Enter the password for this administrator and press
Enter
.The FortiManager model name followed by a
#
is displayed.You have connected to the FortiManager CLI, and you can enter CLI commands.
Connecting to the FortiManager CLI using the GUI
The GUI also provides a CLI console window.
To connect to the CLI using the GUI:
- Connect to the GUI and log in.
For information about how to do this, see the FortiManager Administration Guide.
- Go to System Settings > Dashboard
- Click inside the CLI Console widget. If the widget is not available, select Add Widget to add the widget to the dashboard.