Running Bitvise SSH Client as a Windows Service

It is possible to run a Windows program as a system service. The advantage of services is that they can be started at boot time independently of any logon session, and will continue to run as users log on and off of the machine.

Frequently users would like to run Bitvise SSH Client as a service so that its port forwarding features would come into effect as soon as the machine boots and remain active regardless of users logging on and off of the machine.

Bitvise SSH Client itself does not run as a service, but it can be encapsulated inside a program that enables this. A few such programs we're aware of are:

  • The srvany utility included with the Windows Resource Kits. Guidance to using the srvany utility can be found in the MS Knowledge Base.
  • FireDaemon by Sublime Solutions. This may be easier to set up than srvany.
  • We have received suggestions for the Non-Sucking Service Manager by Iain Patterson.

Bitvise SSH Client supports command-line parameters which can tell it to load a desired profile and connect to the target server immediately. Information about the SSH client's command-line parameters is available from its log area immediately on start-up, as well as if you run Bitvise SSH Client from the command prompt with the /? parameter:

  C:\>BvSsh /?

When configuring Bitvise SSH Client to run as a service this way, it must be set up to run under the Windows account of a user who has already used Bitvise SSH Client to connect to the target SSH server successfully. If this is not done and an arbitrary Windows account or the default Local System account is used, the SSH client will hang on verification of the server's public key fingerprint, and the session will not be established. Likewise, if the server's public key changes, you will need to login interactively into the account under which you are running Bitvise SSH Client as a service, and use the SSH client interactively to connect to the SSH server and verify and save its new public key.