Posted on

PuTTY Window Name Trick

We’re working with Amazon EC2 instances on a regular basis these days and my current preferred method of connecting to the command line is via PuTTY.  It is a fairly simple program that gets the job done (though I prefer SecureCRT for a more robust terminal app).  However, the Amazon host names are setup to be the internal DNS name for the server.   This is usually something useful like domU-11-22-33-44-A1-ST-ea-ks-au-ce-ha-ha.

While the hostname itself is not usually a problem, nor is the fact that PuTTY sets the default window title to the hostname, it gets to be confusing when you have more than 2 terminal windows open and are flipping between them on a regular basis.  I often found myself on server A when I thought I was on server B.   Luckily PuTTY lets you name the windows, or so I thought.   In your session creation window you can go to the Window/Behaviour Category and set the window title.   That works great.

Until you login.

The problem is that many Linux servers shoot back an encoded “change window title” command.  While this is often useful if your server hostname is something like “MainServer” and “SecondaryServer”, it really sucks for the aforementioned internal DNS names that some whacked-out crack addict came up with for Amazon EC2 instances.    However, after a little “Googling” (don’t even get me started on how they pwned me by blanking out a Google Sites page tonight) for a few minutes, I  came across the “fix” which isn’t really explained well on the PuTTY FAQ page that came up (you can disable terminal response to change title messages from the server). The fix is a two step process:

1) Go to the aforementioned Window/Behaviour/Window Title setting and put in a title that makes sense to you.

2) Go to the Terminal/Features settings and check off the Disable remote-controlled window title changing box.

You are now good to go with window titles that makes sense for your EC2 instances, or whatever other PuTTY session title you want to change.

One thought on “PuTTY Window Name Trick

  1. Thank you!
    I had been trying to do this for some time…

Comments are closed.