<div dir="ltr"><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">I don&#39;t think you should have this functionality in Dropbear. This is specific to your use case.</div>You can still do it with a bash script. At boot the script can check the /var/log/secure file to see if there is any activity on dropbear (poll the file size every few seconds)... Reset the internal timer whenever the file size change between poll cycles, then kill dropbear after your 10 minutes of inactivity.<div><br></div><div>Regards,</div><div>Fabrizio</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 8, 2018 at 9:41 AM, Dave Haynes <span dir="ltr">&lt;<a href="mailto:dh@wireless-solutions.ltd.uk" target="_blank">dh@wireless-solutions.ltd.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We have a small range of embedded linux devices used in security systems. We are undertaking a gradual process to harden the default security, and one of our first tasks has been replace the legacy telnet server with dropbear for diagnostic access.<br>
<br>
We have compiled dropbear and have it running well, set up to only allow one session using a patch found on this list.<br>
<br>
We are now considering if it would be worthwhile/useful to modify dropbear to exit after a period with no active connections. So dropbear runs at boot, but exits after (say) 10 minutes with no login. The devices can be remotely rebooted via other means, so there are no access issues for authorised users.<br>
<br>
Does anyone see any reason this wouldn&#39;t be a useful approach? Anyone patched anything similar before we start hacking about, or any pointers where to start?<br>
<br>
(We could give the system a task to terminate dropbear, but it would seem neater to produce a self contained solution.)<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Dave Haynes<br>
RF Design Consultant - Wireless Solutions Ltd.<br>
<br>
</font></span></blockquote></div><br></div>