5 ms·
Years ago I had the habit of shutting down my laptop with "sudo shutdown -h now" at the end of the workday. Until one day I did that accidentally in a live SSH
by zorr 5y ago
Years ago I had the habit of shutting down my laptop with "sudo shutdown -h now" at the end of the workday. Until one day I did that accidentally in a live SSH session.
Since then I always shut down my machine using the GUI and I have Tmux configured with different colors for SSH sessions.
- thanatos519 5y agoThere's a package called molly-guard which can help with that.
- qwertox 5y agoIt's a must on my systems. After I once rebooted the wrong server accidentally, I now force myself to go through the pain of confirming the hostname of the machine. Also, it's possible to circumvent it when you have scripts that need to reboot the machine without interaction by issuing `reboot </dev/null` in the script.
- MattConfluence 5y agoOne time I was using my laptop to remote desktop into a computer I was hundreds of km away from physically, I discovered that if I hit the power key on the laptop (yes, the laptop had a key on the keyboard for power, not a separate power button) while having the remote session window focused, it sent the signal over the wire and put the remote host to sleep instead. Whoops. After that I looked up how to enable wake-on-lan and open up a port to be able to do that remotely.
- ahartmetz 5y agoI don't have the best experience with Wake-on-LAN, it stopped working after a BIOS update or something. So now my desktop is set to turn on when power comes back and it's connected to a WiFi switchable power socket. I bought one with the usual app/cloud rubbish and flashed Tasmota on it.
- iudqnolq 5y agoI have some smart plugs I was planning to hack the network protocol of. I looked up Tasmota but I couldn't figure out how I could see if it would work with the random crap I bought on AliExpress and if so how to do it. Any advice?
- ahartmetz 5y agoWell. I went the other way, I bought known compatible devices. In my case the inofficial name is "OBI socket 2", from the (German) OBI home improvement store. It's about 10€ a piece. That said, if your device is based on some kind of Espressif ESP32 module, you might be able to find the right four pins on the circuit board and find or cobble together a configuration to talk to the I/O ports. Hardware required is a (usually USB) RS232 interface at 3.3 volts, some medium-thin cables, screwdriver, soldering iron, probably multimeter to check things. The firmware flashing and WiFi setup are fairly independent of the I/O port configuration, so you can flash something that can bring up the WiFi connection and web interface and experiment from there.
- yencabulator 5y agoI've done the opposite, back in the day. I used server A's keyboard & monitor to SSH to admin server B. When I was done with the system upgrade on server B, I rebooted it with control-alt-del. Except I rebooted server A.
- ASalazarMX 5y agoHappened to me years ago. Fortunately that server had a power saving bug that most times rebooted it instead of powering it down.