Ash/ssh doesn't set remote terminal title

Hi, noob here.

When I ssh into my device, it doesn't set the terminal title to

user@host

like most hosts I ssh to.

Since I have many terminal tabs open, I end up manually setting the connection's title through the terminal program's UI.

I've tried different terminal programs (gnome-terminal, lxterminal, konsole, xterm) and they all behave the same way.

Is there a way for the terminal's title to get set automatically when ssh connects?

If I remember correctly, this issue affected older OpenWrt releases.
Upgrade to the latest stable release and reset settings to factory defaults.

2 Likes

Worked fine on my gnome terminal and terminator. OpenWrt version 21.02.1

1 Like

cat /etc/openwrt_version
15.05.1

Thank you for the replies, it does turn out that I am running a comparatively-ancient version of OpenWrt

comparatively? It's just plain ancient. Very much unsupported, lots of security vulnerabilities, etc... you shouldn't be using a version that old on the internet at all. Please upgrade to a more recent version... you may need new hardware to run any versions that are currently supported and considered safe/secure (i.e. 21.02 is the current version, 19.07 is nearing EOL, but is still supported and up-to-date on security).

2 Likes

You could also manually do the changes done five years ago, in year 2016, which fixed this in /etc/profile
You can just edit that file in a live router.

See the PS1 export line here...

https://github.com/openwrt/openwrt/commit/d742e1b5137d63175f4c41a4cb357cbe358112ef

Later slightly modified with

https://github.com/openwrt/openwrt/commit/1bd6b91e0f9f53f13b5a9fa2939674012fe7193f

Ps. I thought to answer already yesterday, but when I saw that the answer/solution is from 2016, I thought that you must suffer from something else, as "nobody runs firmware older than that"...

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.