reboot the Fortigate over ssh
Hello everybody :),
I want to connect via ssh to the fortigate and make a reboot. code: sshpass -p 'password' ssh admin@192.168.209.155 exec reboot The fortigate expects y or n, how do I get the fortigate said y or n?
Hello everybody :),
I want to connect via ssh to the fortigate and make a reboot. code: sshpass -p 'password' ssh admin@192.168.209.155 exec reboot The fortigate expects y or n, how do I get the fortigate said y or n?
hiermit läuft es:
set host 192.168.209.155 set user admin set passw password # # spawn ssh -p 22 -o ConnectionAttempts=3 -o ConnectTimeout=60 -o StrictHostKeyChecking=no $user\@$host # # expect "assword:" send "$passw\n" expect "SOC" # #send " config global\n" #expect "(global)" # send "execute reboot\n" expect "(y/n)" # send "y\n"
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.