Created
March 11, 2022 02:59
-
-
Save ytez/4f9fd33555fc7daab1fbb0e21edffd5d to your computer and use it in GitHub Desktop.
[TeraTerm マクロ] FortiGate execute shutdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IPADDR = '169.254.0.1' | |
SSHPORT = '22' | |
USER = 'user' | |
PASSWD = 'password' | |
WAITPASSWD = '^.*[Pp]assword: ?' | |
WAITPROMPT = '^.*# ' | |
;#--- ssh login | |
sprintf2 _SSH_ARGS '%s:%s /ssh /2 /auth=password /user="%s" /passwd="%s"' IPADDR SSHPORT USER PASSWD | |
waitregex WAITPROMPT | |
;#--- execute command | |
sendln 'execute shutdown' | |
; Do you want to continue? (y/n)y | |
; System is shutting down... | |
; The system is going down NOW !! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment