SyntaxHighlighter JS

2013-11-20

Auditing Unix input/output

When accessing a customer's Unix server, it is helpful to allow the customer to audit the commands you execute on the server.

To log all your command line inputs and output to a file, use the command

script filename

This will log all your inputs and output into a log file named filename. (Of course replace filename with whatever you want the file name to be).

To finish with logging your commands, type

exit

To share a Unix screen terminal, so the customer can see your inputs and output in real-time, use the screen command.

  1. You and the customer log in as the same Unix user in ssh
  2. You type in the command

    screen -d -m -S myscreenname
    screen -x myscreenname

    (Of course replace myscreenname with whatever you want the screen name to be).
  3. The customer types the command

    screen -x myscreenname
  4. To finish with sharing your Unix terminals, type in the command

    exit
The great feature of screen is that the customer can type in commands from his Unix terminal and you can see the output on your screen. It is an excellent way to do pair-administration.

If you want to use both script and screen at the same time, run the screen command first. The script command will not record the screen inputs/outputs if it is executed first.

No comments:

Post a Comment