[TriLUG] Capture Terminal Session without Control or Color Codes

Alan Sterger via TriLUG trilug at trilug.org
Thu Dec 1 19:40:42 EST 2022


Yeah so far ttyrec, script and screen output files all contain escape 
sequences.  "Gold" output test is 'less'.  Output has so many escape 
sequences, less tells me its a binary file and do I still want to view it!

Any thing else?

-- Alan Sterger

On 12/1/2022 5:24 PM, Aaron Morrison wrote:
> Look into ttyrec/ttyplay and script/scriptreplay commands. It’s been a decade or so since I’ve done this, but it should be possible. There should be options for recording the timings of the commands, etc. if needed as well.
>
> What I don’t remember off hand is how well they would filter escape sequences for you.
>
> --am
>
>
>> On Dec 1, 2022, at 14:05, Alan Sterger via TriLUG <trilug at trilug.org> 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
>>
>> -- 
>> This message was sent to: Aaron Morrison <ae4ko1 at gmail.com>
>> To unsubscribe, send a blank message to trilug-leave at trilug.org from that address.
>> TriLUG mailing list : https://www.trilug.org/mailman/listinfo/trilug
>> Unsubscribe or edit options on the web    : https://www.trilug.org/mailman/options/trilug/ae4ko1%40gmail.com
>> Welcome to TriLUG: https://trilug.org/welcome



More information about the TriLUG mailing list