Hi, I want to connect to my Fortigate using its hostname via SSH with PuTTY. However, the documentation only mentions establishing a session via IP address and whenever I try to connect by writing the hostname in the Hostname (or IP address) field, it gives me the error host does not exist. Session is established successfully without any errors if I use the the MGMT port's IP address instead.
Solved! Go to Solution.
Nominating a forum post submits a request to create a new Knowledge Article based on the forum post topic. Please ensure your nomination includes a solution within the reply.
Yes it should work. It is probably a DNS issue.
Can you ping the Fortigate by hostname through cmd?
Try adding Hostname to IP relation in your windows hosts file at C:\Windows\System32\drivers\etc\hosts.
Yes it should work. It is probably a DNS issue.
Can you ping the Fortigate by hostname through cmd?
Try adding Hostname to IP relation in your windows hosts file at C:\Windows\System32\drivers\etc\hosts.
Created on 11-04-2024 02:48 AM Edited on 11-04-2024 03:15 AM
@Hatibi It worked by adding the hostname to the hosts file as you mentioned above! I was able to both ping and SSH into my device using the hostname. There was no need for me to enable DNS Server on the MGMT interface. Thank you very much!
In this case you simply need to make sure that your DNS server, configured for your local host (PC), is able to resolve the Hostname to an IP.
No need to enable DNS in MGMT port.
Try the following:
In your PC edit the "hosts.txt" file located in C:\Windows\System32\drivers\etc\ and add an entry for the FortiGate hostname.
The Hosts file acts as a local DNS cache/resolver.
Example:
10.10.10.1 FortiGateLab <---- In your case replace "FortiGateLab" with the hostname you have.
This external guide explains hosts file is: https://en.wikiversity.org/wiki/Hosts_file/Edit#:~:text=The%20hosts%20file%20is%20a,be%20modified%20....
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1732 | |
1106 | |
752 | |
447 | |
240 |
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 2024 Fortinet, Inc. All Rights Reserved.