HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
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