TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Mitigating SSH Based Attacks

1 点作者 xanthine超过 4 年前

1 comment

inquirerofsorts超过 4 年前
Good article.<p>Interested in the benefits of #2? Have never seen this done.<p>The firewall config in #3 seems like the proper layer to be handling it long-term, if you do both then the config in Tip #2 will never actually trigger.<p>With sending an email on login, you&#x27;ll have to create one for every user. To run a command for every login use a sshrc file[1], this runs as sshd before any access is granted, quite useful for a lot of things.<p>You can also set the ForceCommand open in sshd_config but this also runs as the user, I prefer sshrc files for (maybe unjustifiably paranoid) security reasons.<p>Also from memory quite sure there&#x27;s a difference between &#x2F;etc&#x2F;motd and a Banner file set in the config. Banner will run before login, motd runs after.<p>[1] <a href="https:&#x2F;&#x2F;man.openbsd.org&#x2F;sshd#SSHRC" rel="nofollow">https:&#x2F;&#x2F;man.openbsd.org&#x2F;sshd#SSHRC</a>