Bug 2730

Summary: A "LocalCommand" equivalent for AFTER the session ends
Product: Portable OpenSSH Reporter: Mikhail T. <mi+mindrot>
Component: sshAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED WONTFIX    
Severity: enhancement CC: djm, dtucker
Priority: P5    
Version: 7.5p1   
Hardware: All   
OS: All   

Description Mikhail T. 2017-06-15 00:37:14 AEST
Some of the remote servers I ssh into have an annoying habit of changing the xterm's window title -- which remains set even after I logout...

I'd like to be able to run a restoring command locally after ssh exits. I imagine, other people would find other use-cases.

Can a LocalCommandAfter, please, be added -- reusing most of the code of the LocalCommand, but executing at the end of each session?
Comment 1 Darren Tucker 2017-08-04 13:29:40 AEST
Some shells already have a way do this, eg bash's PROMPT_COMMAND.  (http://mg.pov.lt/blog/bash-prompt.html is one such example, I am sure there are many more).
Comment 2 Damien Miller 2019-07-19 15:38:13 AEST
We're not interested in adding additional *Command directive to the ssh client. The same effect can be achieved with a shell script or alias.
Comment 3 Damien Miller 2021-04-23 15:08:18 AEST
closing resolved bugs as of 8.6p1 release