I'm using Linux Mint Debian v2, 64-bit.

I noticed recently that my ssh daemon does not start automatically on boot. It used to. I'm not sure if it had to do with my UFW configuration or sshd_config configurations, but, it doesn't start now unless I put:

sudo service ssh start

I've searched the net and I could find some solutions such as:

sudo update-rc.d ssh defaults

and creating an sshd file in /etc/init.d, but, they didn't work.

I've tried purging ssh and openssh-server and re-installing. But, that didn't have any effect. It started automatically after re-installing, but, once I rebooted and checked for the ssh daemon, it wouldn't show up. 

Any suggestions on how I can get it to start on boot?

5 Answers 5


Assuming you have installed openssh-server , check for sshd startup symbolic links at /etc/rc{2,3,4,5} directories , run ls -l /etc/rc?.d/*ssh if no startup links there , create them by running:

sudo update-rc.d ssh defaults

and reboot.

If problem not solved yet, you may try it by placing service ssh start (before the "exit 0" line) at /etc/rc.local file and reboot again.


Actually it is simple with systemctl

~ $ sudo systemctl enable ssh.service synchronizing state of ssh.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable ssh Created symlink /etc/systemd/system/sshd.service → /lib/systemd/system/ssh.service.

Either reboot to activate or use

~ $ sudo systemctl start ssh.service

  • Is this all to do: sudo systemctl enable ssh.service and then reboot? sysv seems to be the old system before systemd.
    – Timo
    May 25, 2021 at 18:59

This fixed it for me:

crontab -e

Then add this line in the bottom:

@reboot sleep 15 && /bin/systemctl restart sshd

I figured it out. As I posted in my other post: Is there a specific SSH boot log?

In my auth.log file, it wasn't binding to the IP address I put in for the ListenAddress parameter in /etc/ssh/sshd_config. After I changed it back to, it starts up now. Don't quite understand, I thought I could put the IP address of my computer?

And I don't understand why it doesn't start at boot, yet, manually, it can start.

  • 1
    ListenAddress works for me. :D Thanks. Sep 28, 2015 at 4:44
  • I also am using a ListenAddress in my sshd_config file other than None of the solutions on this page worked except changing the ListenAddress back to Does anyone have any REAL solutions or answers as to why this is the case?
    – DanRan
    Jan 14, 2020 at 10:21

I have the same problem on a raspberry, my quick and dirty solution was update-rc.d disable abd I put service ssh start in my rc.local.

maybe in your case a service ssh enable will help,...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .