BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] deadmanish login?
- Subject: [Discuss] deadmanish login?
- From: dsr at randomstring.org (Dan Ritter)
- Date: Mon, 30 Jan 2017 20:46:51 -0500
- In-reply-to: <iydoKFG1q6EvZNl6T2sztfNEyMK3eE7jp_2ZXrcPTgVFK1IPE5deLwZcViB_xDQMcb16enHDIBp9gek18AIxu5VrLtdgSHK6qEOO91dh2nA=@protonmail.com>
- References: <iydoKFG1q6EvZNl6T2sztfNEyMK3eE7jp_2ZXrcPTgVFK1IPE5deLwZcViB_xDQMcb16enHDIBp9gek18AIxu5VrLtdgSHK6qEOO91dh2nA=@protonmail.com>
On Mon, Jan 30, 2017 at 08:20:39PM -0500, Eric Chadbourne wrote: > Just had this crazy thought. > > What if when I login to my server, if I don't issue a particular command within some time period, a certain action happens. > > For example, say I SSH in, and within 5 minutes type foo. If "I" don't type foo, the server kicks me out, closes port 22, and sends an alert email to our team. > > Does anything already do this type of stuff? I figure it shouldn't be hard to script up in a bored afternoon. > > Reason is I sometimes work with vendors who I think suck and don't want them to be lazy and use my account. Use their own. Grrr. There are a number of stories of traps like this. First off, you should be using ssh keys and not passwords. Second of all, you should make sure that what you are doing is legal and won't get you arrested. Obvious implementation methods: - turn on shell logging to a non-standard location. Every time you log in, run a date command. Last thing when you log out, run another one. Now you have timestamps of what you did. - run a script from your .bashrc which spawns a background job. The background job sleeps for 300 seconds, then does things based on whether a particular file exists. - or run a script from your .bashrc which kills your shell if it isn't interrupted in ten seconds. Make "killall shellkill" - run an init script that looks for a particular file, and if it finds it, deletes it and exits. (Best make sure you don't have any unexpected reboots.) It if doesn't find the file, do whatever. -dsr-
- Follow-Ups:
- [Discuss] deadmanish login?
- From: kentborg at borg.org (Kent Borg)
- [Discuss] deadmanish login?
- From: richard.pieri at gmail.com (Richard Pieri)
- [Discuss] deadmanish login?
- References:
- [Discuss] deadmanish login?
- From: sillystring at protonmail.com (Eric Chadbourne)
- [Discuss] deadmanish login?
- Prev by Date: [Discuss] deadmanish login?
- Next by Date: [Discuss] deadmanish login?
- Previous by thread: [Discuss] deadmanish login?
- Next by thread: [Discuss] deadmanish login?
- Index(es):