I would like to execute three commands in a fortinet firewall, the commands are:
#To enter in the config mode: config vdom #To select the virtual domain: edit "name" #To see the info I want: get router info routing-table static But I need to do it remotely, to do that, I try this:
ssh xx@xx "config vdom; edit "xxx"; get router info routing-table static" When I do that, it executes only the command 1 and gives an error in the second and the third.
I tried changing the command to something like this and it executes 1 and 2, but not the third:
ssh xx@xx "config vdom edit "xxxx"; get router info routing-table static" And I tried the same for the third one but it does not work...
Looks like it executes the commands independently and not in a sequence.
Is there a way to do that in a single command?