<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Multiplexing on Linux Café</title>
    <link>https://mrtomlinux.org/tags/multiplexing/</link>
    <description>Recent content in Multiplexing on Linux Café</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sun, 20 Sep 2026 12:02:28 +0200</lastBuildDate>
    <atom:link href="https://mrtomlinux.org/tags/multiplexing/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Why ssh keeps spawning new processes on every connect and how ControlPersist solves it</title>
      <link>https://mrtomlinux.org/post/2026-09-20-why-ssh-keeps-spawning-new-processes-on-every/</link>
      <pubDate>Sun, 20 Sep 2026 12:02:28 +0200</pubDate>
      <guid>https://mrtomlinux.org/post/2026-09-20-why-ssh-keeps-spawning-new-processes-on-every/</guid>
      <description>&lt;h2 id=&#34;why-ssh-keeps-spawning-new-processes-on-every-connect&#34;&gt;Why SSH keeps spawning new processes on every connect&lt;/h2&gt;&#xA;&lt;p&gt;Every time I run &lt;code&gt;ssh host&lt;/code&gt;, the client forks a new process that talks to the remote &lt;code&gt;sshd&lt;/code&gt;.&lt;br&gt;&#xA;On the server side, &lt;code&gt;sshd&lt;/code&gt; spawns a child for each accepted connection.&lt;br&gt;&#xA;The model is simple and works fine for a handful of sessions, but it starts to feel like a drain when you:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;run a script that opens dozens of SSH connections in a row,&lt;/li&gt;&#xA;&lt;li&gt;use CI/CD pipelines that hit a remote host repeatedly, or&lt;/li&gt;&#xA;&lt;li&gt;have a home‑lab with many small services that need quick SSH access.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Each fork eats a few kilobytes of RAM and a handful of file descriptors.&lt;br&gt;&#xA;If you hit the per‑user process limit (&lt;code&gt;ulimit -u&lt;/code&gt;) or the system’s &lt;code&gt;max_user_processes&lt;/code&gt;, you’ll see “Too many users” or “Connection refused” errors.&lt;br&gt;&#xA;Even on a modest machine, the cumulative CPU cost of negotiating the SSH handshake over and over can add up.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
