Web and Unmanaged
cancel
Showing results for 
Search instead for 
Did you mean: 

HP v1910 24G POE Switch - Script to Auto Reboot at Specific Time

eligiable
Occasional Advisor

HP v1910 24G POE Switch - Script to Auto Reboot at Specific Time

Hi!

Could someone please post something to Auto Reboot HP v1910 24G POE Switch. I've created a .bat file, and I'm able to login into the Switch but don't know how to proceed further?

 

  • How to put reboot command over the ssh with time?
@echo off
C:\putty.exe -ssh "host" -l "username" -pw "password"

Thanx in Advance

Regards

2 REPLIES
TerjeAFK
Respected Contributor

Re: HP v1910 24G POE Switch - Script to Auto Reboot at Specific Time

Take a look at plink and see if that is what you need. I have used that in the past to send CLI commands to individual switches.

 

plink <user name>@<switch ip address> -pw xxxxxxx < commands.txt

 

 

eligiable
Occasional Advisor

Re: HP v1910 24G POE Switch - Script to Auto Reboot at Specific Time

Thanx 

 

#!bin/sh
expect - <<EOF
spawn ssh admin@000.000.000.000
expect "password:"
send "mypassword\r"
expect "MySwitch"
send "reboot\r"
expect "Continue? [Y/N]:"
send "Y\r"
EOF