In movies, TV shows, and comics, the idea of a "trap passcode", "secondary passwords", "fake passwords", "kill-switch password", etc., is used every now and then, where if a bad-guy(or a good-guy) is provided with a passcode to something, only to find out that that passcode is set up purely for intruders.
Whether it be wiping the whole system, or a strange gas coming out of the console to concuss the person typing it, the idea is always the same.
In the real world, it's hard to do this sort of thing without it being detected. One method is using incorrect passwords through PAM. This is what I'll be detailing through this blog.
To set this up correctly, it needs to work in a way that after the script has run, it removes itself, and any traces of its actions.
If, say, you're in a corrupt/fascist country such as Australia, the police can apply for a 3LA order, which requires you to hand over your computer passwords, encryption keys, and anything they feel that would help them with their investigation, or you can be charged with a crime, which the maximum prison term is 2 years. -- This includes SSH keys to foreign servers.
If you're a political activist, the access of your sensitive data is 100% unacceptable.
Arguably, forcing somebody to hand over encryption keys is undemocratic, and is comparable to the acts of the Stasi.