Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
jaypat
Visitor

Setting override ssh host key on FortiGate

I'm trying to set ssh host key using my own generated key following the instructions at https://docs.fortinet.com/index.php/document/fortigate/7.6.0/cli-reference/207795941/config-system-s.... The document doesn't specify what is the format for ssh-hsk parameter. I'm using ssh-keygen to generate the private key. Then remove the BEGIN/END and concatenate the lines together. However, this gives me an error "The password does not match hostkey!" when I run end command to commit the settings.

 

Does anyone have an example how to do this correctly? Thank you.

1 REPLY 1
hgarara
Staff
Staff

Hello @jaypat,

 

Confirm if generating host key from sshkeygen looks like the format below(example):


ssh-rsa

AAAAAAAAAAAAhaslkdjalkdsmx;asmscx;la,x;l,alsx,a

asdiohjfwidpokpco,zx;kcjmascpkas;xka;lkx;lakx;laksp

 

- Try to copy the whole text paste it to notepad add quotation from starting and ending.

 

"ssh-rsa

AAAAAAAAAAAAhaslkdjalkdsmx;asmscx;la,x;l,alsx,a

asdiohjfwidpokpco,zx;kcjmascpkas;xka;lkx;lakx;laksp"

 

Now copy the test with quotation and try pasting it to FortiGate under host key and see it helps. Make sure if you have put the password for it, set the correct password for that key on fortigate.

 


 

 

 

Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors