Can I drop SSH connections after five seconds?

I need to allow people to connect to my box, and then drop connections after a few seconds, regardless of whether the client is submitting data. Is this possible?

In addition, can I create a completely fake server? (i.e. only allow in-memory changes of files, to fool any attackers connecting into thinking that the server is real?)


You are searching 'honeypots'.

If you want to have fake SSH server, you can try kippo. It allow to you make a scenario for the attackers, they can upload some files to the special filesystem and so on. For setting kippo, you can see this URL.

If you want to use fake servers for another services, see for example this link. There is mentioned some other programs, which are runs as a honeypots and can emulate Windows (Dionaea), web services (Glastopf), and web browsers too (Jsunpack-n).