我正在尝试使用 Azure 执行一个 .conf 文件,该文件具有一些命令行,这些命令行可以在 FortiOS v6.4.3(基于 Linux 的系统)的虚拟机中执行到 Fortinet 的串行控制台中。
我使用 AZ CLI 将脚本执行到虚拟机中。命令如下:
az vm run-command invoke --subscription "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" --resource-group "myresourcegroup" --name "myfortinet" --command-id RunShellScript --scripts $scriptfgtvm
其中 $scriptfgtvm 包含以下内容:
config system interface
edit port1
set allowaccess ping https ssh fgfm snmp
next
end
问题是我们没有看到所需的修改,并且反馈是“不支持”但已成功配置。
{
"value": [
{
"code": "ProvisioningState/succeeded",
"displayStatus": "Provisioning succeeded",
"level": "Info",
"message": "Not supported.",
"time": "2021-08-05T08:24:01+00:00"
}
]
}
当我们通过 SSH 远程连接到 vm 时,我们进入的是串行控制台,而不是 shell 控制台,与 Azure Bastion 相同