Normally people would just use the sd card method, where this is done automatically when moving jumper jp4, but i guess you may encounter the issue of that missing chip mentioned before...
unfortunately, it seems that the same problem (not flashing from SD card) may exist even if that missing chip is in place
Seems that Bitmain done something tricky to prevent their firmware being replaced by a thirdparty firmware.
There is a method to restore ssh access
using an exploit in the first release. If you have installed the second release, it is possible to "downgrade" back to the first release, since both firmwares are signed. Then with the first release you can try the exploit. This uses proprietary code but is one way to restore ssh without physical access.
This one really worked in my case. BUT in my case, that tiny chip near SD card is in place, so can't tell if this will work for those whose control board does not have that chip in place.
I am not really good at these things, but it looks like what Bitmain hid under vague "further security" ended up being not entirely secure ... I mean if I managed to use that method to get rid of signature check for new updates, then a virus would surely be capable to use that to do its stuff.