Date Archives June 2014

Record SSH session on Mac

This applies to recording a SSH session initiated on Mac OS X.

Sometimes it is useful to record your SSH session for debugging purpose and sometimes just to remember exactly what you did when playing around with new technologies on your VPS.

The ‘tee’ command on Mac (and Unix/Linux or course) will route standard input and output through it, and save anything that passes through to a file. So you can pipe any command through ‘tee’ and have your interaction saved to a file. Fabulous.

$ ssh root@yourserver.example.com | tee /tmp/output

Very useful.