Dear all,
I' d like to execute some commands in a FortiMail using a script. I thougth I could do it by passing the commands in an ssh command line from a Linux box, but when I do so, nothing happens.
Example:
[root@linuxbox /test_dir]# ssh admin@192.168.1.99 ' get config ssh'
admin@192.168.1.99' s password:
[root@linuxbox /test_dir]#
As you can see, nothing happens.
The password is correct because when I enter a wrong password, the behavior is different:
[root@linuxbox /test_dir]# ssh admin@192.168.1.99 ' get config ssh'
admin@192.168.1.99' s password:
Permission denied, please try again.
admin@192.168.1.99' s password:
[root@linuxbox /test_dir]#
If I login with ssh and execute the same command, it shows somthing:
=[ BEGIN ssh ]=============================
[root@linuxbox /test_dir]# ssh admin@192.168.1.99
admin@192.168.1.99' s password:
Type ? for a list of commands.
mx1 # get config ssh
set system interface port1 config allowaccess https ping ssh telnet
set system interface port2 config allowaccess https ping ssh
set system interface port3 config allowaccess https ping ssh
mx1 # exit
Connection to 192.168.1.99 closed.
[root@linuxbox /test_dir]#
=[ END ssh ]===============================
Is there any way to send a command to the FortiMail from a script?
Regards,
Marcos