Use Supermicros IPMI and SSH to power on a server

It is possible to access the IPMI of an Supermicro server via SSH and controll the power of the server.

I have found an old Supermicro board and have discovered the SSH support of the IPMI. So if you want to try out the following steps you have to enable the SSH service of the IPMI. After enabling the service you should be able to login using the SSH client of your choice.

$ ssh ADMIN@1.2.3.4

ATEN SMASH-CLP System Management Shell, version 1.04
Copyright (c) 2008-2009 by ATEN International CO., Ltd.
All Rights Reserved 


->

As you might have noticed Supermicro has implemented DMTF's Systems Management Architecture for Server Hardware (SMASH) standard. There are some simple commands to navigate and do things. In the following example you can see how I have used the show and cd commands to navigate and how I have used the start command to start the server.

-> show
/ 

  Targets :
    system1

  Properties :
    None

  Verbs :
    cd
    show
    help
    version
    exit


-> cd /system1
/system1

-> show
/system1

  Targets :
    logs1
    pwrmgtsvc1
    sensors1
    sol1

  Properties :
    None

  Verbs :
    cd
    show
    help
    version
    exit


-> cd pwrmgtsvc1
/system1/pwrmgtsvc1

-> show
/system1/pwrmgtsvc1

  Targets :
    none

  Properties :
    Name=IPMI Power Service
    CreationClassName=IPMI_PowerManagementService
    ElementName=Server Power Management Service
    EnabledState=5
    RequestedState=12
    EnabledDefault=2
    PowerState=1

  Verbs :
    cd
    show
    help
    version
    exit
    start
    stop
    reset


-> start
/system1/pwrmgtsvc1
start done...

If you whant to automate some tasks you can pass the commands from a file on your local computer.

$ cat cmds.cpl 
cd /system1/pwrmgtsvc1
start

$ ssh -T ADMIN@1.2.3.4 < cmds.cpl                        

[...]

-> /system1/pwrmgtsvc1

-> /system1/pwrmgtsvc1
start done... 

It is also possible write the commands to start the server in one line.

$ echo 'start /system1/pwrmgtsvc1' | ssh -T ADMIN@1.2.3.4

[...]

-> /system1/pwrmgtsvc1
start done...

Conclusion

Using SSH is a good idea if you don't have or don't want to install the ipmi tools to just start the server. But at least in the version I have tested I was unable to upload a SSH key to authenticate.

Links

Related articles