How to Firmware Update via SSH

I recovered my router using the USB when blue light was flashing using the following procedure.

But the firmware did not upgrade in the last step. How can I upgrade the firmware ?

I am using WD clout Gen2. I am able to boot from USB and telnet to it. (SSH does not work yet). Unable to find /usr/local/sbin folder and also the scripts that you mentioned.