Run PuTTY as a Windows Service

How to Run PuTTY as a Windows Service with AlwaysUp

Start a SSH Tunnel with PuTTY (Plink) when your PC boots and keep it running 24x7 in the background!

PuTTY is a free implementation of the Telnet and SSH protcols.


To configure PuTTY as a Windows Service with AlwaysUp 8.0 and later:

  1. Download the PuTTY zip package and extract it to an appropriate location, if necessary. We have placed PuTTY in C:\PuTTY for this tutorial.

  2. If necessary, construct the command that will establish your SSH tunnel using PuTTY's command line utility, Plink.exe. For example, after consulting the Plink command line documentation, we decided to use this command to open up a tunnel from port 8022 on the local machine to port 80 on our web server at www.coretechnologies.com:

    Plink.exe -ssh -2 -L localhost:8022:www.coretechnologies.com:80 -l <login> -pw <password> www.coretechnologies.com
    Note: Passing the password on the command line as above is insecure! For real-world environments, we recommend setting up a PuTTY saved session or storing your private key in Pageant as described in the PuTTY documentation.

    Before continuing, open up a command prompt and make sure that your command works as expected. Be sure to accept the server's host key if you are prompted to do so!

  3. Download and install AlwaysUp, if necessary.

  4. Start AlwaysUp.

  5. Select Application > Add to open the Add Application window:

    Add Application

  6. On the General tab:

    • In the Application field, enter the full path to PuTTY's command line executable, PLINK.EXE. Since we have placed PuTTY in C:\PuTTY, this is:

      C:\PuTTY\PLINK.EXE

    • In the Arguments field, enter the parameters to Plink identified in step 2.

    • In the Name field, enter the name that you will call the application in AlwaysUp. We have specified PuTTY but you can specify another name if you like.

    PuTTY Windows Service: General Tab

  7. Click over to the Logon tab and enter the user name and password of the account where you have run your Plink command successfully - probably the one you are logged in to right now! AlwaysUp will run Plink in this account so that it can find its settings, saved host keys, etc.

    PuTTY Windows Service: Logon Tab

  8. Click over to the Startup tab and check the Ensure that the Windows Networking components have started box. This informs AlwaysUp that PuTTY needs the network to be fully available to do its work.

    PuTTY Windows Service: Startup Tab

  9. Click the Save >> button. In a couple of seconds, an application called PuTTY will show up in the AlwaysUp window. It is not yet running though.

    PuTTY Windows Service: Created

  10. To start PuTTY from AlwaysUp, choose Application > Start "PuTTY". The state should transition to Running after a few seconds and the tunnel should be established as expected:

    PuTTY Windows Service: Running

  11. That's it! Next time your computer boots, your SSH tunnel will come up immediately, without anyone needing to log on. Please restart your PC now and test that everything works as expected after Windows reboots.

    And please feel free to edit PuTTY in AlwaysUp to check out the many other settings that may be appropriate for your environment. For example, send email alerts if it stops, hide the console, boost Plink's priority, etc.



PuTTY not working properly as a Windows Service?

  • If the Interactive Services Detection Dialog comes up and you wish to avoid it, edit PuTTY in AlwaysUp and check the When a user logs on, don't show the application's windows and tray icons box at the bottom of the Logon tab (pictured in step 7). This will hide PuTTY's console and prevent Windows from showing the dialog.
  • From AlwaysUp, select Application > Report Activity > Today... to bring up a HTML report describing the interaction between AlwaysUp and PuTTY. The AlwaysUp Event Log Messages page explains the more obscure messages.
  • Check the AlwaysUp FAQ for answers to commonly asked questions and troubleshooting tips.
  • Contact us and we will be happy to help!

Download & Try it Free!

Download AlwaysUp and Run as a Service Today! Version 15.1 New!

7.9 MB Installer
Our 12,000+ customers include...
Compatible with Windows 11 Compatible with Windows Server 2022 Compatible with Windows 10
Over 94,000 installations, and counting!
 
AlwaysUp is number 1! Run as a Service with AlwaysUp

Rock-solid for the past 19+ years!