TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Send a message to teams channel on Linux server SSH connexion

45 pointsby Mootyalmost 2 years ago

10 comments

blueflowalmost 2 years ago
This is done via profile.d and can be circumvented by executing anything else than a login shell:<p><pre><code> ssh host &#x2F;bin&#x2F;sh -i </code></pre> Better would be enabling PAM via sshd_config and generating the message from there.
评论 #36001221 未加载
评论 #36001074 未加载
评论 #36001531 未加载
pimlottcalmost 2 years ago
Original title: &quot;Alert via Teams when user logon via SSH&quot;. Capitalization is important since it&#x27;s actual Microsft Teams.
评论 #36028724 未加载
Mootyalmost 2 years ago
I&#x27;ve copied a project that basically sends a message to telegram with informations when someone connects on a linux server.<p>But this time it&#x27;s for MS Teams channels, which is possible through Webhooks.<p>I thought that might be interesting for other persons so I share :) It can probably be adapted to any other webhooks, as soon as webhook urls accepts the JSON sent.
calvinmorrisonalmost 2 years ago
I think, going off the auth log is better, or just logs in general. Build one script that matches regex patterns and sends alerts and you can monitor for a lot more than just logins.
评论 #36002381 未加载
ca_techalmost 2 years ago
May want to add a proxy config to pass proxy information to the curl command. I would expect that some of the more important servers to get alerted about are those NOT able to access the internet directly.
评论 #36004188 未加载
hopplaalmost 2 years ago
Cool idea, but I would have implemented this as a PAM-script rather than as a user profile script.
high_priestalmost 2 years ago
This, but for Matrix network! Man, the possibilities with an alerting system like this!
评论 #36010292 未加载
heyonialmost 2 years ago
If this means never having to open the Teams client ever again then I’m very excited.
评论 #36002948 未加载
woopwoop24almost 2 years ago
tell me you are french, by not telling me you are french ;) &quot;connexion&quot; :D
bandramialmost 2 years ago
20 years ago this capability was bog-standard for any team communication protocol. We&#x27;ve lost so many good workflows in the 21st century.
评论 #36001138 未加载