One of the main rules when working on production servers is to keep trace of your actions. That is, so called, “cover your ass” policy. :) As most of my colleagues in IBM are using Windows on their workstations (strange isn’t it?!) they are using putty which provides logging options for their SSH sessions. But I am using Linux and OpenSSH client does not provide this luxury so I had to create this short script to save my SSH logs. It will start SSH client with all the parameters you pass over the command line but at the same time it will also start script command and log everything in right log file. Very neat. :)

First, there is PuTTY for Linux as well if you need (more or less) the same. It works fine, but you don’t have the ‘window context menu’ (no Duplicate Session or Change Settings etc.) Second, the apostrophes used in the above code are not suitable for direct copy paste into the shell (they are not ‘typewriter apostrophes’, rather ‘acute accents’.)