How to start SSH daemon on boot on Linux Mint Debian v2












6















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?










share|improve this question





























    6















    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?










    share|improve this question



























      6












      6








      6


      2






      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?










      share|improve this question
















      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?







      ssh services sshd daemon






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 21 '15 at 4:02







      linstar

















      asked Jun 19 '15 at 2:42









      linstarlinstar

      3362415




      3362415






















          5 Answers
          5






          active

          oldest

          votes


















          3














          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.






          share|improve this answer

































            2














            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






            share|improve this answer































              1














              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 0.0.0.0, 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.






              share|improve this answer





















              • 1





                ListenAddress 0.0.0.0 works for me. :D Thanks.

                – Brijesh Valera
                Sep 28 '15 at 4:44



















              0














              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,...






              share|improve this answer































                0














                This one fixed for me



                crontab -e


                Then add this line in the bottom.



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




                share








                New contributor




                Saud Iqbal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.




















                  Your Answer








                  StackExchange.ready(function() {
                  var channelOptions = {
                  tags: "".split(" "),
                  id: "106"
                  };
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function() {
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled) {
                  StackExchange.using("snippets", function() {
                  createEditor();
                  });
                  }
                  else {
                  createEditor();
                  }
                  });

                  function createEditor() {
                  StackExchange.prepareEditor({
                  heartbeatType: 'answer',
                  autoActivateHeartbeat: false,
                  convertImagesToLinks: false,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: null,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader: {
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  },
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  });


                  }
                  });














                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function () {
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f210710%2fhow-to-start-ssh-daemon-on-boot-on-linux-mint-debian-v2%23new-answer', 'question_page');
                  }
                  );

                  Post as a guest















                  Required, but never shown

























                  5 Answers
                  5






                  active

                  oldest

                  votes








                  5 Answers
                  5






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  3














                  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.






                  share|improve this answer






























                    3














                    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.






                    share|improve this answer




























                      3












                      3








                      3







                      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.






                      share|improve this answer















                      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.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Jul 16 '16 at 2:28









                      clk

                      1,6091821




                      1,6091821










                      answered Jun 19 '15 at 3:15









                      ArnabArnab

                      768719




                      768719

























                          2














                          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






                          share|improve this answer




























                            2














                            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






                            share|improve this answer


























                              2












                              2








                              2







                              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






                              share|improve this answer













                              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







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Sep 12 '17 at 4:03









                              Diarmuid O'BriainDiarmuid O'Briain

                              211




                              211























                                  1














                                  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 0.0.0.0, 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.






                                  share|improve this answer





















                                  • 1





                                    ListenAddress 0.0.0.0 works for me. :D Thanks.

                                    – Brijesh Valera
                                    Sep 28 '15 at 4:44
















                                  1














                                  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 0.0.0.0, 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.






                                  share|improve this answer





















                                  • 1





                                    ListenAddress 0.0.0.0 works for me. :D Thanks.

                                    – Brijesh Valera
                                    Sep 28 '15 at 4:44














                                  1












                                  1








                                  1







                                  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 0.0.0.0, 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.






                                  share|improve this answer















                                  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 0.0.0.0, 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.







                                  share|improve this answer














                                  share|improve this answer



                                  share|improve this answer








                                  edited Apr 13 '17 at 12:36









                                  Community

                                  1




                                  1










                                  answered Jun 21 '15 at 22:21









                                  linstarlinstar

                                  3362415




                                  3362415








                                  • 1





                                    ListenAddress 0.0.0.0 works for me. :D Thanks.

                                    – Brijesh Valera
                                    Sep 28 '15 at 4:44














                                  • 1





                                    ListenAddress 0.0.0.0 works for me. :D Thanks.

                                    – Brijesh Valera
                                    Sep 28 '15 at 4:44








                                  1




                                  1





                                  ListenAddress 0.0.0.0 works for me. :D Thanks.

                                  – Brijesh Valera
                                  Sep 28 '15 at 4:44





                                  ListenAddress 0.0.0.0 works for me. :D Thanks.

                                  – Brijesh Valera
                                  Sep 28 '15 at 4:44











                                  0














                                  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,...






                                  share|improve this answer




























                                    0














                                    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,...






                                    share|improve this answer


























                                      0












                                      0








                                      0







                                      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,...






                                      share|improve this answer













                                      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,...







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Jun 21 '15 at 22:34









                                      clericcleric

                                      295




                                      295























                                          0














                                          This one fixed for me



                                          crontab -e


                                          Then add this line in the bottom.



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




                                          share








                                          New contributor




                                          Saud Iqbal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                          Check out our Code of Conduct.

























                                            0














                                            This one fixed for me



                                            crontab -e


                                            Then add this line in the bottom.



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




                                            share








                                            New contributor




                                            Saud Iqbal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                            Check out our Code of Conduct.























                                              0












                                              0








                                              0







                                              This one fixed for me



                                              crontab -e


                                              Then add this line in the bottom.



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




                                              share








                                              New contributor




                                              Saud Iqbal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                              Check out our Code of Conduct.










                                              This one fixed for me



                                              crontab -e


                                              Then add this line in the bottom.



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





                                              share








                                              New contributor




                                              Saud Iqbal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                              Check out our Code of Conduct.








                                              share


                                              share






                                              New contributor




                                              Saud Iqbal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                              Check out our Code of Conduct.









                                              answered 3 mins ago









                                              Saud IqbalSaud Iqbal

                                              11




                                              11




                                              New contributor




                                              Saud Iqbal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                              Check out our Code of Conduct.





                                              New contributor





                                              Saud Iqbal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                              Check out our Code of Conduct.






                                              Saud Iqbal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                              Check out our Code of Conduct.






























                                                  draft saved

                                                  draft discarded




















































                                                  Thanks for contributing an answer to Unix & Linux Stack Exchange!


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid



                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.


                                                  To learn more, see our tips on writing great answers.




                                                  draft saved


                                                  draft discarded














                                                  StackExchange.ready(
                                                  function () {
                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f210710%2fhow-to-start-ssh-daemon-on-boot-on-linux-mint-debian-v2%23new-answer', 'question_page');
                                                  }
                                                  );

                                                  Post as a guest















                                                  Required, but never shown





















































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown

































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown







                                                  Popular posts from this blog

                                                  濃尾地震

                                                  How to rewrite equation of hyperbola in standard form

                                                  No ethernet ip address in my vocore2