[TriLUG] Capture Terminal Session without Control or Color Codes

Alan Sterger via TriLUG trilug at trilug.org
Thu Dec 1 16:59:46 EST 2022


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