My Cloud EX2 Ultra SSH Button App Shutdown Query


I have a WD My Cloud EX2 Ultra (2-bay) running 2 X 2TB WD Red drives in JBOD. The firmware version is 2.40.155

I have a question regarding shutting down my EX2 from my Android phone through using SSH Button App. I have set up the Network and SSH settings in EX2 as follows:

On the SSH Button App on my phone I have it setup as follows:

After putting those settings on the SSH Button App and trying to execute the command I keep getting this error message when I try and execute the operation:

“Returncode was 127”

The command I am typing in on SSH Button is as follows: /sbin/shutdown -h -P now

Screenshot of error message on SSH Button App:

As a result I am unable to shutdown the EX2 over SSH.

Can someone please guide me on this and tell me what I’m doing wrong? I don’t know SSH and I’m new to it. After hunting this forum I came to know of the SSH commands that can be used to shutdown and power down the EX2 so I ask if I’m keying the command correctly or not?

Please someone help me on this.


First, there is a dedicated subforum for the EX2 where users more familiar with that device may be able to assist.

Generally this subforum (My Cloud) tends to cover the single bay/single drive My Cloud units which have far fewer options/features than the EX2 Ultra.

Now on the issue of using SSH to shutdown a My Cloud. There are a good number of past discussions ( on how to do so on a single bay/single drive My Cloud. The issue some run into is using the incorrect command for their My Cloud firmware version. This is due to the single bay/single drive My Cloud units having two different firmware versions. The first gen single bay My cloud using firmware v3.x/v4.x which is different than the firmware used on the second gen single bay My Cloud which uses v2.x firmware.

Warning: The various methods implemented using SSH on the single bay units may not work or be applicable to multi bay units.

For a first gen v4.x firmware single bay My Cloud the following command run via SSH will “shutdown” the My Cloud.

/sbin/shutdown -h -P now

Supposedly (as I don’t have a 2nd gen unit) on the v2.x firmware second gen single bay My Cloud models the following command run via SSH will “shutdown” the My Cloud.

/usr/local/modules/script/ -h now

Note that on the single bay/single drive My Cloud models one isn’t really shutting off the My Cloud unit. Power still remains flowing its just the OS has halted/shutdown. To completely power off a single bay/single drive My cloud one has to remove the power after shutting it down. The single bay/single drive My Cloud units do not have a power switch button.

1 Like

Thank-you so very much for your detailed reply. It helped me so much and best of all it worked!

This command did the trick for shutting down my 2-Bay My Cloud EX2 Ultra via SSH Button app on my Android phone:

/usr/local/modules/script/ -h now

All the other parameters were the same.

The power to the unit remains though and I unplugged the power cable and that took care of it.

Having the SSH App work to get this process done with one single click is super nifty.

Thank-you again for your help regarding this, really appreciate it.