2

I'm using WSL with Ubuntu 20.04. When I open Windows Terminal, and make a ssh connection to my server, the tab title stay the same. So the Tab Title is still the username@password from the WSL, not from server where I connected to.

Tabtitle when I start Windows Terminal: user@laptop Then I do "ssh user@server" to make a ssh connection to my server But the Tabtitle stay at user@laptop. I would like to have here user@server.

Have someone an idea? Thanks.

muru
  • 197,895
  • 55
  • 485
  • 740
bmwGTR
  • 31

1 Answers1

1

Fixed it with adding something to .ssh/config:

Host *
    PermitLocalCommand yes
    LocalCommand printf '\033]0;%%s\007' "%r@%n"

When I now do ssh server, the LocalCommand is executed after the ssh command and set the tab title, using the user and the name which are provided in config of this server. For example:

Host server
  Hostname 1.1.1.1
  User root

If I do then ssh server, the tab title will be changed to root@server.

bmwGTR
  • 31