snipt

Ctrl+h for KB shortcuts

Bash

Restart of SSH Connections

pstree -cpal | egrep [s]shd | perl -lne '($i)=(/(\d+)/); `kill -1 $i`'
https://snipt.net/embed/8f8b6190734e8065fec2cd0b33808997/
/raw/8f8b6190734e8065fec2cd0b33808997/
8f8b6190734e8065fec2cd0b33808997
bash
Bash
1
2019-07-16T18:35:36
True
False
False
Dec 20, 2012 at 05:53 AM
/api/public/snipt/52131/
restart-of-ssh-connections
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>pstree -cpal <span class="p">|</span> egrep <span class="o">[</span>s<span class="o">]</span>shd <span class="p">|</span> perl -lne <span class="s1">&#39;($i)=(/(\d+)/); `kill -1 $i`&#39;</span> </span></pre></div> </td></tr></table>
restart, ssh, unix