Y

yubihibernate

Hibernate (or whatever) your computer as soon as your Yubikey is unplugged.