With random occurence for ssh logins into remote terminal ('agetty') there is immediate output of unrelated characters into that ssh session terminal.
With periodical repetition these are "hh��cahh�" or "hh��!ca[" and "CR" "LF".
Furthermore copy&paste for some characters (recognized til now for: $ ") was not possible, since there was no output into terminal after (and including) these characters.
There has been no change of system configuration files since recognizing the difficulties for this Debian distribution. Some of this irregular output problems can be solved (for minutes endurance) with
stty sane
How to debug the reason for this encoding(?) problems and how getting a process description or program name of a pid ( strace -fe write $(lsof -t "/proc/$$/fd/1" | sed 's/^/-p/' -> with separate ps | grep $pid process/program already closed ) of the process that causes this output to stdout?
�is typically a sign of a non-unicode characters received on a Unicode terminal. But in the context, it seems simply binary bytes sent randomly (I don’t know why). The kernel doesn’t deal with Unicode vs. 8-bits characters. No need to usestty. Your program should work with the correct encoding which should be given by theLANGenvironment variable. Finding the source of the bogus chars may be difficult.screenconfiguration in the client had somehow messed up the TERM variable. Those strange sequences are terminal control characters. Check out the values of the TERM and LANG variables on the client before connecting (and on the server just to be sure).