Thanks to this blog I have now found a solution to something i have looked for for a long time. I had in fact left the search thinking there is no solution!! So i will just copy-paste his post here!
The following tip's handy for me as it renames your window's title to the remote hostname. Combined with a hardstatus "tab-bar", it makes finding open sessions easier.
Create
Create
~/.ssh_hostname and chmod +x:#!/bin/sh echo -ne "\033k$1\033\\"And then add to
~/.ssh/config (if you have Host sections, put it above them):PermitLocalCommand yes LocalCommand ~/.ssh_hostname %hYou can also do this via a function in your shell profile, though that has the disadvantage that you have to parse SSH arguments, or assume the last is always the hostname. Similarly, you can add the magic echo statement into the remote shell profile (or your remote shell prompt) on every machine/account.
Comments