Friday 27 August 2021

Customize SSH Window Title in PuTTY Client for CLI Invocation

customize-window-title-in-PuTTY.md

In this blog, we will see how can we configure PuTTY to allow for customizable Window Title when launched from CLI.

When you open a PuTTY session using GUI the options is available under "Terminal" -> "Features" -> "Disable remote-controlled window title changing" where you can control Windows title change, and you can customize Window title under "Window" -> "Behaviour" -> "Window title:".

But in this blog, I will talk about how to permanently configure this option so that whenever you launch any PuTTY session using CLI this feature is available to you. The following steps you need to perform:

  • Step-1:

    • Since PuTTY keeps its configuration in Windows Registry, we will have to modify the Registry entry to change the default settings and select the option "Terminal" -> "Features" -> "Disable remote-controlled window title changing"

    • Run this command using Windows Command Prompt:

      • REG ADD HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings /t REG_DWORD /v NoRemoteWinTitle /d 1 /f

    • This is a one-time activity only. If you upgrade or re-install PuTTY you will have to re-run the above command.

  • Step-2:

    • Now you can run a PuTTY session specifying the custom window title.

    • Example, run the command:

      • putty.exe -ssh root@10.133.90.12 -loghost "My Personal Title"

    • This will open the PuTTY session for the IP 10.133.90.12 using root user and the SSH Window title will be "My Personal Title".


No comments:

Post a Comment