LWN: Comments on "Creating an SSH honeypot" https://lwn.net/Articles/848291/ This is a special feed containing comments posted to the individual LWN article titled "Creating an SSH honeypot". en-us Sat, 01 Nov 2025 09:54:44 +0000 Sat, 01 Nov 2025 09:54:44 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Creating an SSH honeypot https://lwn.net/Articles/851719/ https://lwn.net/Articles/851719/ janoszen <div class="FormattedComment"> You can do that too, micro VMs such as Firecracker can be used to that effect.<br> </div> Tue, 06 Apr 2021 13:09:55 +0000 Creating an SSH honeypot https://lwn.net/Articles/851718/ https://lwn.net/Articles/851718/ janoszen <div class="FormattedComment"> (Dev here) You can, ContainerSSH just takes a different approach and takes care of locking the &quot;attacker&quot; in a container (or a microVM if you set it up that way).<br> </div> Tue, 06 Apr 2021 13:09:51 +0000 Creating an SSH honeypot https://lwn.net/Articles/850301/ https://lwn.net/Articles/850301/ smurf <div class="FormattedComment"> It buys you protection from a DoS attack that forks ten gazillion ssh daemons and loads down your gateway box. These do exist.<br> </div> Wed, 24 Mar 2021 13:40:15 +0000 Creating an SSH honeypot https://lwn.net/Articles/850233/ https://lwn.net/Articles/850233/ nix <div class="FormattedComment"> What does this buy you over just turning on ChallengeResponseAuthentication, turning off PasswordAuthentication, and ignoring the fruitless attacks? (They hardly use any bandwidth because they always seem to try possibilities sequentially, though I suppose if you&#x27;re right at the limit of your bandwidth plan you might just notice it.)<br> </div> Tue, 23 Mar 2021 23:38:57 +0000 Creating an SSH honeypot https://lwn.net/Articles/849926/ https://lwn.net/Articles/849926/ smurf <div class="FormattedComment"> The &quot;in conjunction with appropriate firewall rules&quot; part is important though, you want to limit the number of open connections. pam_recent kicks in too late to catch a well-written DoS attempt.<br> </div> Sun, 21 Mar 2021 11:28:50 +0000 nonstandard SSH port https://lwn.net/Articles/849940/ https://lwn.net/Articles/849940/ giraffedata <p>My anecdote: I too have been using a nonstandard SSH port for about 10 years and have seen zero attacks except about two years ago there was an onslaught of password guesses that went on for several months. It was the kind where the guesses come in infrequently from lots of sources, the idea being to try password X on a thousand machines rather than try a thousand passwords on machine X; i.e. it wasn't someone targeting my server in particular. <p>At first I thought hacking technology had just advanced to where my trick wouldn't work anymore; I was pleased to see the attacks stop. Sun, 21 Mar 2021 03:20:03 +0000 Creating an SSH honeypot https://lwn.net/Articles/849878/ https://lwn.net/Articles/849878/ metalheart <div class="FormattedComment"> Why not use Linux Auditing System to log those activities?<br> </div> Fri, 19 Mar 2021 17:42:17 +0000 Creating an SSH honeypot https://lwn.net/Articles/849811/ https://lwn.net/Articles/849811/ dtlin That's why I like <a href="https://github.com/az143/pam_recent">pam_recent</a>, which (in conjunction with appropriate firewall rules) can start rate-limiting connections as soon as they try to connect, instead of waiting for sshd to log. Fri, 19 Mar 2021 05:49:01 +0000 Creating an SSH honeypot https://lwn.net/Articles/849774/ https://lwn.net/Articles/849774/ dskoll <p>You can configure the ban/unban actions, so with the right setup, you can do what you need. It's a bit of a pain to do safely and securely, but certainly not impossible. Thu, 18 Mar 2021 18:39:48 +0000 Creating an SSH honeypot https://lwn.net/Articles/849762/ https://lwn.net/Articles/849762/ jschrod <div class="FormattedComment"> It&#x27;s been some time when I looked at fail2ban.<br> <p> Is it now supported out-of-the-box to issue iptables/nftables command on a different server, as a reaction to an detected break in attempt?<br> <p> The use case is a firewall in front of several boxes that allow ssh access. If fail2ban detects a break-in attempt in one of those boxes, the rules shall be changed on the firewall. Blocking access just on this specific box is not sufficient.<br> </div> Thu, 18 Mar 2021 16:47:56 +0000 Creating an SSH honeypot https://lwn.net/Articles/849473/ https://lwn.net/Articles/849473/ dskoll <p>Almost any network server is vulnerable to this sort of attack; surely SSH has a configuration setting somewhere to close the socket if the client doesn't do anything for a while? Seems to me <tt>LoginGraceTime</tt> might do the trick here. <p>And yes, clients can dribble data slowly over a connection to tie up a child process, but again... any network server is vulnerable to this and it's a pretty well-known attack. Tue, 16 Mar 2021 13:01:04 +0000 Creating an SSH honeypot https://lwn.net/Articles/849340/ https://lwn.net/Articles/849340/ gdt <p>Another useful tactic is to exclusively bind sshd to an additional random IPv6 interface identifier (an interface ID is the least significant 64 bits of the IPv6 address). An interface can hold multiple IPv6 interface IDs without fuss. This gives a search space of 2<sup>63</sup>, which is ~10<sup>14</sup> more than the search space of 2<sup>16</sup> for TCP ports.</p> <p>Because this is an additional address used solely for incoming SSH the usual operation of the computer doesn't leak beyond the subnet a useful address for a SSH brute force attempt.</p> <p>This tactic retains the ability to have a DNS name for the SSH service, which can be sometimes be useful.</p> Mon, 15 Mar 2021 12:58:30 +0000 Creating an SSH honeypot https://lwn.net/Articles/849326/ https://lwn.net/Articles/849326/ Sesse <div class="FormattedComment"> There are bots that operate like this. Surprisingly many of them. <br> </div> Sun, 14 Mar 2021 23:24:56 +0000 Creating an SSH honeypot https://lwn.net/Articles/849321/ https://lwn.net/Articles/849321/ flussence <div class="FormattedComment"> An anecdote about port numbering: I&#x27;ve been doing this for at least 10 years and IIRC I&#x27;ve had zero unwanted SSH connections as a result (compared to SMTP, which gets one every few minutes). Surprisingly effective, I&#x27;d recommend doing it for other services where SRV records are the norm too.<br> </div> Sun, 14 Mar 2021 20:17:03 +0000 Creating an SSH honeypot https://lwn.net/Articles/849298/ https://lwn.net/Articles/849298/ k8to <div class="FormattedComment"> Though this problem isn&#x27;t really caused by fail2ban, it&#x27;s just that fail2ban doesn&#x27;t assist against this type of denial-of-service. So I don&#x27;t view this as a fail2ban issue, just a thing it doesn&#x27;t handle for you.<br> <p> Since fail2ban is designed mostly to just cut off bot attacks, it seems not that big a deal to me. If you want to handle more active attackers you should be taking other approaches at least in addition.<br> </div> Sun, 14 Mar 2021 03:29:07 +0000 Creating an SSH honeypot https://lwn.net/Articles/849282/ https://lwn.net/Articles/849282/ Sesse <div class="FormattedComment"> fail2ban has a critical issue with SSH, though; if someone just connects to port 22 and then hangs, you can quickly eat up the number of SSH children without fail2ban ever noticing (because sshd never logs this).<br> </div> Sat, 13 Mar 2021 16:03:38 +0000 Creating an SSH honeypot https://lwn.net/Articles/849272/ https://lwn.net/Articles/849272/ jak90 <div class="FormattedComment"> Even if I prefer to whitelist access to port 22 to a few safe addresses and networks (which on most servers contains the whole IPv6 address space), I wish there was a fail2ban plugin that could simply extend IP bans to the whole allocation or even all networks belonging to an AS if it contains more than one or two bad apples.<br> </div> Sat, 13 Mar 2021 13:32:30 +0000 Creating an SSH honeypot https://lwn.net/Articles/849262/ https://lwn.net/Articles/849262/ gps <div class="FormattedComment"> Don&#x27;t forget about fail2ban on your actual ssh servers... And to go clean out the infinitely growing fail2ban database of every compromised address that has probed you on the internet every now and then...<br> </div> Sat, 13 Mar 2021 08:05:03 +0000 Creating an SSH honeypot https://lwn.net/Articles/849216/ https://lwn.net/Articles/849216/ Trou.fr <div class="FormattedComment"> A trivial thing to implement and which can help against mistakes: whitelisting the users allowed to connect through ssh by allowing only a specific group:<br> <p> AllowGroups sshok<br> <p> so your test user you&#x27;re creating for &quot;just a quick check&quot;, will not be allowed to connect.<br> </div> Fri, 12 Mar 2021 15:24:16 +0000 Creating an SSH honeypot https://lwn.net/Articles/849154/ https://lwn.net/Articles/849154/ pabs <div class="FormattedComment"> This reminds me of SourceForge&#x27;s highly restricted SSH setup, although I think they use virtual machines instead of containers.<br> </div> Fri, 12 Mar 2021 05:41:37 +0000