This seems like the right place to ask: does anyone know of a hack or modification that will e.g. dump hostname on a ~? -- so many times I'm in a few layers deep and likely to miscount.
Do you mean something like putting below in your .bashrc file?
PS1="\h$ "
This will show the host name on terminal prompt.
Not quite -- I want something that will show me a hostname or instantiating command from the SSH escape sequence subsystem (e.g. if I'm N SSH sessions deep and hit ~~~., where will the kill land).
Well, ~^Z and then figure it out.
True, though I'm not always passing through something that will give me a shell (often enough that this generally works, though)