I accidentally just locked myself out of my pi while editing /etc/ssh/sshd_config. The pi is still mounted as a drive on my desktop via sshfs so I looked at sshd_config and I can see that I accidentally left UsePAM blank. Now ssh connections are refused :(
I have a monitor, mouse and keyboard nearby so I plugged them in, but HDMI hot-swapping is not enabled by default apparently. So all I have is a blank screen. I also noted that after plugging in the keyboard, I could not get the numlock light to turn on so I'm not even sure if the keyboard and mouse are working.
I found this post that suggests the possibility of turning on HDMI explicitly with this command:
tvservice --explicit="DMT 35 HDMI"
I also found this post that says tvservice is not the best way to turn the monitor on/off, and instead I should use
vcgencmd display_power 1
However, I can't see the screen to see what I'm doing.
What keys should I type after I plug in the keyboard, mouse, and monitor?
Note: I absolutely cannot reboot this raspberry pi because I have the longest uptime in my friend group and this earns me one free beer per week. I have to exhaust every possibility before I reboot.