Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Normally, when you load a saved session in PuTTY and connect to it, PuTTY will set the window title to the host name of the system you connected to (plus the string "PuTTY").

Now I have many different sessions that all connect to the same host, but on different ports (because the host runs several SSH tunnels on different ports). Therefore seeing the host name is not very helpful, since it's always the same.

So I'd like PuTTY to show the name of the loaded session in the window title. Is there a way to do this?

The only way I could find is to set the window title manually (Window / Behaviour / Window title). But I believe I'd have to do this manually for each session, which is rather tedious.

share|improve this question

3 Answers 3

This function will set the title of your PuTTY window to the given String

# set title 
title() {
  echo -ne "\033]0;"$1"\007"

You can use this to set the title from the command line or from scripts, e.g. from within .bashrc.

share|improve this answer

The solution below seems to solve this problem.

Hope this helps, Andy

share|improve this answer
While this may answer the question, it's preferable if you can summarise the answer here as links do go dead over time. – Ladadadada May 28 '14 at 10:43
This is the procedure described on that site: In the putty session setup window enable the checkbox labelled "Disable remote-controlled window title changing" found under Terminal->Features. Next give your session window a name via the Window->Behaviour dialog. Enter the title into the textbox labelled "Window title:" – BdN3504 Oct 14 at 14:57

The only other route I'm aware of is to use the xterm emulation features to set the title from the system you are logged into (on RedHat and Suse linux, the bash prompt is written to the titlebar by default).

See this page for a description of the process and the relevant escape sequence.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.