What's new

How to restart dropbear using cru

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

yuckypants

New Around Here
I've been fighting with what I thought was a memory leak for about 4 days now - and I think I finally figured it out (htop saved me); dropbear was running a crazy amount of processes and not killing the processes once they're finished. The sessions are created because I use Home Assistant with an asus integration that logs in and pulls router stats. I've used this integration for years, and it hasn't been updated recently, so I don't know why it's suddenly a problem now. I also don't want to stop using it.

Anyway, I figured that I'll just create a cronjob to kill and restart dropbear every hour or so. I can successfully kill the processes, but I can't seem to restart it. The way I've found to restart it is to go into the GUI, in the Administration > System tab, and set Enable SSH to NO, and then back to LAN ONLY. I'd like to automate this so I don't have to frequently do it - unless watchdog handles it and I've just been impatient?

Of course, I also use a custom port, so I'll need to include that option too.

BTW, this was a problem on stock firmware, which is why I went to Merlin to see if it was the firmware. Now I don't ever want to go back.
 
Code:
service restart_sshd
 
Code:
service restart_sshd

Thanks, I had a kill process and then a start process rather than restart. However, seems to be moot now anyway, I dug deeper and found the exact culprit, and since it was fixed, I'm at 59% usage and holding for just over 12 hours now. Previously, I would have already eaten through 25% of available RAM in 12 hrs.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Staff online

Top