Yes - quite simple and old-fashioned, actually ...
I have this line in the SSH users' .login file:
/usr/local/sbin/sms 4153331111 4158882222 "USER LOGIN TO XXX - $DATE" >& /dev/null
... where the 'sms' command, above, is a shell script I wrote to call twilio messaging with the curl command. A very simple example of that would be: curl -X POST -d "Body=$msg" -d "From=$from" -d "To=$to" "https://api.twilio.com/2010-04-01/Accounts/$accountsid/Messages" -u "$accountsid:$authtoken"
... and this works like a charm.Alternatively, you could rick-roll your on-call sysadmin:
/usr/local/bin/curl -XPOST https://api.twilio.com/2010-04-01/Accounts/$accountsid/Calls.json --data-urlencode "To=$number" --data-urlencode "From=$callerid" --data-urlencode "Url=http://demo.twilio.com/docs/voice.xml" -u $accountsid:$authtoken
(the voice.xml demo is, in fact, Rick Astley)One benefit of using certificates for emergency access is that SSHD logging can be configured to show a lot more detail about the certificate that was used. With public keys, there isn't anything to show. But with certificates you have a key ID, serial number, principals, CA fingerprint, etc. So, that log is a good hook for sounding the alarm. A more advanced version of this would allow you to record a reason for using the emergency access key when the connection is made (or when sudo is used).
There's, at minimum, client IP address, username, and the key fingerprint -- which has always been good enough for me.
There might be even more details available but I'm not sitting in front of a computer to check.
But really good point, and i love the analogy to 'break glass'
Edit: ooo @rsync just gave another good approach