Error in running sshd as a service in cygwin












1














I am using cygwin run sshd. But now the sshd is not running as a service. When I start the service using 'net start sshd', Message comes like, "the cygwin sshd service could not be started.The service did not report an error. More help is available by typing NET HELPMSG 3534" and if run using 'cygrunsrv -S sshd' the error comes like "Error starting a service. Query service status:win32 error 1062"



I have removed cygwin completely by deleting its services, server and registry. And installed again, but sshd is not running as a service.



can i have the solution for this?










share|improve this question






















  • try from an administrative cmd prompt if u havent already, and try net stop sshd before net start sshd.
    – barlop
    Sep 29 '15 at 12:02












  • and state how you removed "removed cygwin completely by deleting its services, server and registry". And don't confuse Cygwin with ssh within it. Cygwin itself has no services. So state what deletions you made. as it may be of interest. But there's no need to remove cygwin to fix ssh. At most you'd want to remove ssh to reinstall ssh.
    – barlop
    Sep 29 '15 at 12:04


















1














I am using cygwin run sshd. But now the sshd is not running as a service. When I start the service using 'net start sshd', Message comes like, "the cygwin sshd service could not be started.The service did not report an error. More help is available by typing NET HELPMSG 3534" and if run using 'cygrunsrv -S sshd' the error comes like "Error starting a service. Query service status:win32 error 1062"



I have removed cygwin completely by deleting its services, server and registry. And installed again, but sshd is not running as a service.



can i have the solution for this?










share|improve this question






















  • try from an administrative cmd prompt if u havent already, and try net stop sshd before net start sshd.
    – barlop
    Sep 29 '15 at 12:02












  • and state how you removed "removed cygwin completely by deleting its services, server and registry". And don't confuse Cygwin with ssh within it. Cygwin itself has no services. So state what deletions you made. as it may be of interest. But there's no need to remove cygwin to fix ssh. At most you'd want to remove ssh to reinstall ssh.
    – barlop
    Sep 29 '15 at 12:04
















1












1








1







I am using cygwin run sshd. But now the sshd is not running as a service. When I start the service using 'net start sshd', Message comes like, "the cygwin sshd service could not be started.The service did not report an error. More help is available by typing NET HELPMSG 3534" and if run using 'cygrunsrv -S sshd' the error comes like "Error starting a service. Query service status:win32 error 1062"



I have removed cygwin completely by deleting its services, server and registry. And installed again, but sshd is not running as a service.



can i have the solution for this?










share|improve this question













I am using cygwin run sshd. But now the sshd is not running as a service. When I start the service using 'net start sshd', Message comes like, "the cygwin sshd service could not be started.The service did not report an error. More help is available by typing NET HELPMSG 3534" and if run using 'cygrunsrv -S sshd' the error comes like "Error starting a service. Query service status:win32 error 1062"



I have removed cygwin completely by deleting its services, server and registry. And installed again, but sshd is not running as a service.



can i have the solution for this?







windows ssh cygwin services openssh






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 29 '15 at 11:42









IT researcherIT researcher

43882342




43882342












  • try from an administrative cmd prompt if u havent already, and try net stop sshd before net start sshd.
    – barlop
    Sep 29 '15 at 12:02












  • and state how you removed "removed cygwin completely by deleting its services, server and registry". And don't confuse Cygwin with ssh within it. Cygwin itself has no services. So state what deletions you made. as it may be of interest. But there's no need to remove cygwin to fix ssh. At most you'd want to remove ssh to reinstall ssh.
    – barlop
    Sep 29 '15 at 12:04




















  • try from an administrative cmd prompt if u havent already, and try net stop sshd before net start sshd.
    – barlop
    Sep 29 '15 at 12:02












  • and state how you removed "removed cygwin completely by deleting its services, server and registry". And don't confuse Cygwin with ssh within it. Cygwin itself has no services. So state what deletions you made. as it may be of interest. But there's no need to remove cygwin to fix ssh. At most you'd want to remove ssh to reinstall ssh.
    – barlop
    Sep 29 '15 at 12:04


















try from an administrative cmd prompt if u havent already, and try net stop sshd before net start sshd.
– barlop
Sep 29 '15 at 12:02






try from an administrative cmd prompt if u havent already, and try net stop sshd before net start sshd.
– barlop
Sep 29 '15 at 12:02














and state how you removed "removed cygwin completely by deleting its services, server and registry". And don't confuse Cygwin with ssh within it. Cygwin itself has no services. So state what deletions you made. as it may be of interest. But there's no need to remove cygwin to fix ssh. At most you'd want to remove ssh to reinstall ssh.
– barlop
Sep 29 '15 at 12:04






and state how you removed "removed cygwin completely by deleting its services, server and registry". And don't confuse Cygwin with ssh within it. Cygwin itself has no services. So state what deletions you made. as it may be of interest. But there's no need to remove cygwin to fix ssh. At most you'd want to remove ssh to reinstall ssh.
– barlop
Sep 29 '15 at 12:04












2 Answers
2






active

oldest

votes


















0














Error starting a service. Query service status:win32 error 1062




Sometimes you get a sshd/cygrunsrv service error after trying to run
the service.



cygrunsrv: Error starting a service:
QueryServiceStatus: Win32 error 1062:
The service has not been started.


There can be a couple of causes for this. The following may fix the
problem (this is not an option on XP Home).



Solution 1.



You may have an old or corrupt installation of Cygwin. Try
reinstalling.



The following may also help:




  1. cygrunsrv -R sshd

  2. REBOOT (or use the Task Manager to kill all instances of sshd that may be running in the background)

  3. run ssh-host-config -y again.


This seemed to help on a few systems I worked on.



Solution 2.



Open an explorer window and use the "Properties | Security" dialog and
explicitly add "Full Control" for the SYSTEM user to the following
directories:



C:Cygwin
C:Cygwinvar
C:Cygwinvarlog



Source Cygwin SSHD HowTo



See also StackOverflow question Unable to start cygwin sshd service





Further reading




  • Install Secure Shell Server (sshd) on Windows using Cygwin






share|improve this answer































    0














    Checking /var/log/sshd.log sshd complained about /var/empty now owned by root (which is called "SYSTEM" on Windows).
    The solution was to change the owner in an administrative Cygwin shell:



    chown SYSTEM /var/empty





    share|improve this answer





















      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "3"
      };
      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: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      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%2fsuperuser.com%2fquestions%2f979636%2ferror-in-running-sshd-as-a-service-in-cygwin%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      Error starting a service. Query service status:win32 error 1062




      Sometimes you get a sshd/cygrunsrv service error after trying to run
      the service.



      cygrunsrv: Error starting a service:
      QueryServiceStatus: Win32 error 1062:
      The service has not been started.


      There can be a couple of causes for this. The following may fix the
      problem (this is not an option on XP Home).



      Solution 1.



      You may have an old or corrupt installation of Cygwin. Try
      reinstalling.



      The following may also help:




      1. cygrunsrv -R sshd

      2. REBOOT (or use the Task Manager to kill all instances of sshd that may be running in the background)

      3. run ssh-host-config -y again.


      This seemed to help on a few systems I worked on.



      Solution 2.



      Open an explorer window and use the "Properties | Security" dialog and
      explicitly add "Full Control" for the SYSTEM user to the following
      directories:



      C:Cygwin
      C:Cygwinvar
      C:Cygwinvarlog



      Source Cygwin SSHD HowTo



      See also StackOverflow question Unable to start cygwin sshd service





      Further reading




      • Install Secure Shell Server (sshd) on Windows using Cygwin






      share|improve this answer




























        0














        Error starting a service. Query service status:win32 error 1062




        Sometimes you get a sshd/cygrunsrv service error after trying to run
        the service.



        cygrunsrv: Error starting a service:
        QueryServiceStatus: Win32 error 1062:
        The service has not been started.


        There can be a couple of causes for this. The following may fix the
        problem (this is not an option on XP Home).



        Solution 1.



        You may have an old or corrupt installation of Cygwin. Try
        reinstalling.



        The following may also help:




        1. cygrunsrv -R sshd

        2. REBOOT (or use the Task Manager to kill all instances of sshd that may be running in the background)

        3. run ssh-host-config -y again.


        This seemed to help on a few systems I worked on.



        Solution 2.



        Open an explorer window and use the "Properties | Security" dialog and
        explicitly add "Full Control" for the SYSTEM user to the following
        directories:



        C:Cygwin
        C:Cygwinvar
        C:Cygwinvarlog



        Source Cygwin SSHD HowTo



        See also StackOverflow question Unable to start cygwin sshd service





        Further reading




        • Install Secure Shell Server (sshd) on Windows using Cygwin






        share|improve this answer


























          0












          0








          0






          Error starting a service. Query service status:win32 error 1062




          Sometimes you get a sshd/cygrunsrv service error after trying to run
          the service.



          cygrunsrv: Error starting a service:
          QueryServiceStatus: Win32 error 1062:
          The service has not been started.


          There can be a couple of causes for this. The following may fix the
          problem (this is not an option on XP Home).



          Solution 1.



          You may have an old or corrupt installation of Cygwin. Try
          reinstalling.



          The following may also help:




          1. cygrunsrv -R sshd

          2. REBOOT (or use the Task Manager to kill all instances of sshd that may be running in the background)

          3. run ssh-host-config -y again.


          This seemed to help on a few systems I worked on.



          Solution 2.



          Open an explorer window and use the "Properties | Security" dialog and
          explicitly add "Full Control" for the SYSTEM user to the following
          directories:



          C:Cygwin
          C:Cygwinvar
          C:Cygwinvarlog



          Source Cygwin SSHD HowTo



          See also StackOverflow question Unable to start cygwin sshd service





          Further reading




          • Install Secure Shell Server (sshd) on Windows using Cygwin






          share|improve this answer














          Error starting a service. Query service status:win32 error 1062




          Sometimes you get a sshd/cygrunsrv service error after trying to run
          the service.



          cygrunsrv: Error starting a service:
          QueryServiceStatus: Win32 error 1062:
          The service has not been started.


          There can be a couple of causes for this. The following may fix the
          problem (this is not an option on XP Home).



          Solution 1.



          You may have an old or corrupt installation of Cygwin. Try
          reinstalling.



          The following may also help:




          1. cygrunsrv -R sshd

          2. REBOOT (or use the Task Manager to kill all instances of sshd that may be running in the background)

          3. run ssh-host-config -y again.


          This seemed to help on a few systems I worked on.



          Solution 2.



          Open an explorer window and use the "Properties | Security" dialog and
          explicitly add "Full Control" for the SYSTEM user to the following
          directories:



          C:Cygwin
          C:Cygwinvar
          C:Cygwinvarlog



          Source Cygwin SSHD HowTo



          See also StackOverflow question Unable to start cygwin sshd service





          Further reading




          • Install Secure Shell Server (sshd) on Windows using Cygwin







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited May 23 '17 at 11:33









          Community

          1




          1










          answered Sep 29 '15 at 11:54









          DavidPostillDavidPostill

          104k25224258




          104k25224258

























              0














              Checking /var/log/sshd.log sshd complained about /var/empty now owned by root (which is called "SYSTEM" on Windows).
              The solution was to change the owner in an administrative Cygwin shell:



              chown SYSTEM /var/empty





              share|improve this answer


























                0














                Checking /var/log/sshd.log sshd complained about /var/empty now owned by root (which is called "SYSTEM" on Windows).
                The solution was to change the owner in an administrative Cygwin shell:



                chown SYSTEM /var/empty





                share|improve this answer
























                  0












                  0








                  0






                  Checking /var/log/sshd.log sshd complained about /var/empty now owned by root (which is called "SYSTEM" on Windows).
                  The solution was to change the owner in an administrative Cygwin shell:



                  chown SYSTEM /var/empty





                  share|improve this answer












                  Checking /var/log/sshd.log sshd complained about /var/empty now owned by root (which is called "SYSTEM" on Windows).
                  The solution was to change the owner in an administrative Cygwin shell:



                  chown SYSTEM /var/empty






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 12 '17 at 12:12









                  Gábor BarnaGábor Barna

                  1




                  1






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Super User!


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





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • 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%2fsuperuser.com%2fquestions%2f979636%2ferror-in-running-sshd-as-a-service-in-cygwin%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 do I know what Microsoft account the skydrive app is syncing to?

                      Grease: Live!

                      When does type information flow backwards in C++?