Keep the freeSSHd Windows Service running 24/7 with Service Protector

How to Keep the freeSSHd Windows Service Running 24/7 with Service Protector

Automatically restart freeSSHd if it stops for any reason. Achieve 100% uptime for your SSH workflows, even in the face of failures.

As its name implies, freeSSHd is a free implementation of the SSH server protocol. You can install the server as a windows service, to start automatically when your server boots:

freeSSHd installed as a Windows Service

And like any other windows service, you can manage it from the Services control panel application:

freeSSHd installed as a Windows Service


To monitor the freeSSHd windows service and have Service Protector automatically restart it if it stops for any reason:

  1. Download and install Service Protector, if necessary.

  2. Start Service Protector.

  3. Select Protector > Add to open the Add Protector window:

    Add Protector

  4. On the General tab, in the Service to protect field, choose the freeSSHd windows service, called FreeSSHDService. You will notice a green circle to the left of the entry if the service is already running, as was the case on our server.

    freeSSHd Windows Service: General Tab

  5. If you think it is a good idea to periodically restart freeSSHd once per week, to cure it of memory leaks and keep the server "fresh", switch to the Monitor tab. From there, check the At the following times box, and use the Add button to specify an appropriate time to restart freeSSHd. We have chosen every Sunday at midnight, when all good sys admins are safely tucked up in their beds.

    freeSSHd Windows Service: Monitor Tab

  6. We are now done configuring freeSSHd so click the Save >> button to record your settings. In a few seconds, an entry for FreeSSHDService will show up in the Service Protector window. Service Protector is not yet monitoring it though, as shown by the "Not protected" value in the State column:

    freeSSHd Windows Service: Created

    And if freeSSHd is running, feel free to click on the green circle in the "Service State" column to pop up a tooltip showing a few details of the service:

    freeSSHd Windows Service: Information Tooltip

  7. To start monitoring freeSSHd, choose Protector > Start "FreeSSHDService". The shield icon will go to green to indicate that the freeSSHd windows service is being managed:

    freeSSHd Windows Service: Protected

  8. That's it! Next time your computer boots, freeSSHd will start as normal and Service Protector will begin monitoring the service to quickly restart it if it stops for any reason.

    And now that you have gone through the basics, please feel free to edit freeSSHd in Service Protector and check out the many other settings that may help your SSH server to operate smoothly. For example, send an email when the service fails, check for the service hogging the CPU, and much more.



Trouble protecting the freeSSHd Windows Service?