Live data from Hacker News

Posting successful SSH logins to Slack

sandrinodimattia.net

41–50 of 71 posts

Re: Posting successful SSH logins to Slack

#41
post #15

Earlier quoted context omitted.

Some shells do have this built in, for example bash's history file, typically set to ~/.bash_history

Which is easily defeated, of course ...

Some file systems support append-only permissions, although I've never used them. I wonder if that would work with bash's history file?

Re: Posting successful SSH logins to Slack

#46
post #18
post #14

Earlier quoted context omitted.

Not in my book. Slack seems to be really cool but since it's not self-hosted and owned by a US entity, I'll stay clear.

It's an ssh login notification with a user and IP address. It's not notifying everyone what the new launch codes are. Let's not overstate it.

I'm not referring to the SSH logging, I mean slack in general.

Re: Posting successful SSH logins to Slack

#47
post #44

If you want to send email on login, add in /etc/profile : echo "`whoami` logged in at `date` from `echo $SSH_CLIENT`" | mail -s "`hostname` login" youremail@example.com Note that people can still ssh execute remotely etc.

You'll definitely want to add a '&' at the end of that line so that you don't delay user logins if the network is down or mail barfs.

Re: Posting successful SSH logins to Slack

#48
post #4

Excellent. I've been thinking about having a SSHD keylogger post to slack (or some other log). It's crazy that sshd doesn't have this functionality built-in. It's so important to know what your admins are executing on your machines. Aside from the fact that they might have been compromised, it's just good to know what sort of general administration is being done.

Surprised at how many people didn't read parent's post as satire...

Re: Posting successful SSH logins to Slack

#49
post #39
post #5

Earlier quoted context omitted.

That's a great idea. But I didn't find any docs that explain how to override DND. I opened a feature request instead, so we'll see how it goes :)

That kind of gets you into this sort of problem: https://blogs.msdn.microsoft.com/oldnewthing/20110310-00/?p=... If you start overriding DND, now the user is going to want super-DND. Which somebody will then want to override, and so on. The correct solution is that your users need to not set DND when they in fact need to be disturbed, and your systems shouldn't be disturbing unnecessarily, and to the extent that's a…

The biggest problem with DND in my book is that when first introduced it was enabled automatically, and not super obvious that it was enabled.

This caused more than a few missed announcements and made escalation hard for a bit.

Re: Posting successful SSH logins to Slack

#50
post #14

Earlier quoted context omitted.

Not in my book. Slack seems to be really cool but since it's not self-hosted and owned by a US entity, I'll stay clear.

What would you use instead?

IRC on a server I control, or some slack clone with on-premise hosting. Call me paranoid, but I'm paranoid.
Post reply on HN