- Community Home
- >
- Networking
- >
- Legacy
- >
- Switches, Hubs, Modems
- >
- Use SSH to power cycle PoE ports
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2010 03:49 AM
тАО03-26-2010 03:49 AM
config
aaa auth ssh enable local
I'm using plink as the windows client.
I can run the command and get a telnet interface as follows:
plink -ssh -l admin -pw switchpassword 192.168.0.123
but if I try any of the below I get this error: FATAL ERROR: Server refused to start a shell/command
plink -ssh -l admin -pw switchpassword 192.168.0.123 "config"
plink -ssh -l admin -pw switchpassword -batch 192.168.0.123 "config"
plink -ssh -l admin -pw switchpassword -m readers.txt 192.168.0.123
plink -ssh -l admin -pw switchpassword -batch -m readers.txt 192.168.0.123
---readers.txt---
config
no interface 5 power
interface 5 power
no interface 6 power
interface 6 power
---readers.txt---
Any idea where I'm going wrong?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2010 05:21 AM
тАО03-26-2010 05:21 AM
Re: Use SSH to power cycle PoE ports
I've tried to get remote commands working via plink in the past and it's never worked for me. I don't think the switches support that type of interaction.
In the end I used a perl script to enter commands as if it was a normal interactive SSH session (but it wasn't bullet-proof).
A better option for you would probably be to find the relevant SNMP oid to power cycle the ports. I don't know what is is but I'll try and have a look for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2010 05:24 AM
тАО03-26-2010 05:24 AM
Re: Use SSH to power cycle PoE ports
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2010 05:56 AM
тАО03-26-2010 05:56 AM
Re: Use SSH to power cycle PoE ports
pethPsePortAdminEnable.
(1.3.6.1.2.1.105.1.1.1.3 which is powerEthernetMIB.1.1.3)
And a value of "1" is 'true' which enables power delivery on the port and "2" is 'false'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2010 07:31 AM
тАО03-26-2010 07:31 AM
Re: Use SSH to power cycle PoE ports
I've downloaded netsnmp and ran this command to see all available OIDs and dumped to a file:
snmpwalk -v 2c -c public -m all -Os 192.168.1.1 iso > snmp.txt
I've then searched the file for 1.3.6.1.2.1.105.1 and wasn't able to find it. Should I have been able to?
If 1.3.6.1.2.1.105.1 = pethPsePortAdminEnable, what do the remaining digits equate to (1.1.3)? Is the second digit the port, and the third the power state? Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2010 07:40 AM
тАО03-26-2010 07:40 AM
SolutionIt will depend upon what access your public community has ("show snmp-server"). I suspect if it's "restricted" it won't be able to see that oid. If that's the case you should create a new community with "unrestricted" access to use.
1.3.6.1.2.1.105.1 isn't pethPsePortAdminEnable, it's powerEthernetMIB. The 1.1.3 refers to pethPsePortAdminEnable then the port number would be on the end of that (e.g. 1.3.6.1.2.1.105.1.1.1.3.25 for port 25)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2010 07:58 AM
тАО03-26-2010 07:58 AM
Re: Use SSH to power cycle PoE ports
Also, you want to search for "pethPsePortAdminEnable" in that file rather than the numberical OID to find it in that snmpwalk command output.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2010 08:14 AM
тАО03-26-2010 08:14 AM
Re: Use SSH to power cycle PoE ports
snmpset.exe -v 2c -c hello 192.168.0.123 1.3.6.1.2.1.105.1.1.1.3.1.5 i "2"
snmpset.exe -v 2c -c hello 192.168.0.123 1.3.6.1.2.1.105.1.1.1.3.1.6 i "2"
snmpset.exe -v 2c -c hello 192.168.0.123 1.3.6.1.2.1.105.1.1.1.3.1.5 i "1"
snmpset.exe -v 2c -c hello 192.168.0.123 1.3.6.1.2.1.105.1.1.1.3.1.6 i "1"