Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
kdot
New Contributor II

Change CLI (ssh) credentials on multiple infrastructure devices in Fortinac GUI

Brand new to Fortinac. Discovered several hundred infrastructure devices. Need to change the CLI (ssh) creds Fortinac uses to connect to these devices. Looking for a way to do this in bulk from the GUI vs. changing every device individually. Any help is appreciated.

1 Solution
ebilcari

in addition to this answer, there is also an example included in the command description to do the changes on every device:

> device

 

Example 8 - To set the CLI_CREDENTIALS attribute to the same user, passwords, and session type to ssh2
Device -all -setAttr -name CLI_CREDENTIALS -value user:pass:enablepass:SSH2

 

or limit the change to a specific group of devices:

-group <device group name>

- Emirjon
If you have found a solution, please like and accept it to make it easily accessible for others.

View solution in original post

5 REPLIES 5
AEK
SuperUser
SuperUser

I thought you can do that on the GUI by selecting many devices on Inventory view, the right click, and change once the credentials for all.

Otherwise have you tried do that from CLI?

I think you can achieve it (and many such tasks) if you use the below command in a script.

device -ip <device-IP> -setAttr ...

 

AEK
AEK
kdot
New Contributor II

AEK, Thanks for your reply and recommendations. I found a way that "should" work through the GUI, but if I select more than 5 devices it hangs at "Saving change, please wait..."

I'll take a closer look at the CLI commands you recommended. Thanks!

ebilcari

in addition to this answer, there is also an example included in the command description to do the changes on every device:

> device

 

Example 8 - To set the CLI_CREDENTIALS attribute to the same user, passwords, and session type to ssh2
Device -all -setAttr -name CLI_CREDENTIALS -value user:pass:enablepass:SSH2

 

or limit the change to a specific group of devices:

-group <device group name>

- Emirjon
If you have found a solution, please like and accept it to make it easily accessible for others.
kdot
New Contributor II

Emirjon, thank you for the detailed instructions to change the infrastructure device CLI creds using both the GUI and Fortinac CLI. 

 

I was able to complete all the changes in one operation using the CLI commands. 

Using the GUI may work, but for me it hung up regularly and would change the creds on devices randomly and without verification, which actually makes things more difficult. I'd steer others towards the CLI for this type of change.

ebilcari
Staff
Staff

From the Container you can select multiple devices and change the CLI credentials in one step:

netpin.PNG

- Emirjon
If you have found a solution, please like and accept it to make it easily accessible for others.
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