When I need a record of what I typed and what came back, script does it without any extra software.
script -q -a session.log
# work as usual, then:
exit
script starts a new shell and writes all input and output to the file. -a appends instead of overwriting and -q hides the start and stop messages. With the Linux util-linux version, -c 'command' records a single command instead of a shell. The file contains escape codes, so view it with less -R. Remember that anything you type, including passwords at visible prompts, ends up in the log.
Further reading: script manual page