[TriLUG] Capture Terminal Session without Control or Color Codes
Brian via TriLUG
trilug at trilug.org
Fri Dec 2 09:07:09 EST 2022
Hi Alan,
What do you expect the output file to look like after capturing
something non-linear (like a vi session)? Not snark -- knowing what you
want / expect to see might help suggest a good solution.
It might be that for capturing non-linear terminal activity, a "screen
shot" (a one-off capture of the entire visible terminal text; in screen,
this can be done by pressing Ctrl-a, h) at user-defined moments might be
the best answer. Otherwise, I'm not sure how a single log file would
clearly describe something like navigating around in vi.
Cheers,
-Brian
On 12/1/22 16:59, Alan Sterger via TriLUG wrote:
> Hi all,
>
> Need to capture both sides of an ssh session for documentation including
> all in-session commands (like vi that redraws the screen). Last time I
> did this used something like
>
> ssh user at server |tee /path/to/ssh/logfile.log However, received a lot of
> non-printable characters like Control and Color codes. Then spent a
> couple of hours running session output through various text filters.
> Local terminal is Ubuntu 20.04; ssh'ing to RHEL 7 if it matters. Any
> suggestions? -- Alan Sterger
>
More information about the TriLUG
mailing list