Re: I can't connect my device anyway. But it's working.
Depending on your model, you may have a console port and/or USB port. If you have a console port you can use a console cable (one should have come with the firewall) and putty to the serial port (9600,8,N,1).
If you have a USB port you can use FortiExplorer, however the software is being depreciated on PC. If you have an active support contract you can still download it from the support portal.
Either way should get you access to the device to re-enable HTTPS/SSH to the device.