My first major rescue using ed(1) involved using a router's web-UI to change the port, but something went wrong: I think there was an extra space or other garbage character, causing the number-parsing to return 0, and changed the webmin portal to listen on port 0. Which it promptly refused to listen on, bricking(ish) the device with no way to get back into the webmin portal.
Saved by an RS-232 connection and the super-stripped down busybox-like environment with no $EDITOR other than ed, I managed to find the underlying webmin config file, edit the "Port 0" back to something usable, restart the router, and get the company back online.
😰