Record SSH session for reporting
The issue is whenever logging ssh to a linux vm for investigating or doing something, after done, I want to report on what I did for writing into ticket. In the past, I use the historycommand and scroll back to the beginning. It's waste of time & effort, sometime cannot trace because of lacking scroll or closing terminal tab by human mistake, or wanna trace in the next few days.
So that I need a good solution for this to work effectively
1
touch /ssh.log
2
ssh <target> -v | tee -ia /ssh.log
Copied!
For seeing output for tracking & reporting, use tail
1
tail -f -n +1 /ssh.log
Copied!
Last modified 1yr ago
Copy link