Anyone know a linux command (or Solaris) that copies console / SSH sessions input/output and stores it in a text file for later retrieval?
Basically, I want to do some linux studies at home then e-mail the text file to my instructor that shows all my input and output.
A few years back I took an advanced Solaris class and our instructor has everyone SSH into his machine, execute a command (can't remember), then do our test / quizes, then we would exit the command (can't remember), then close SSH. The instructor would go into a text file and see all the students input / output from the SSH session.
I suppose I could just copy / paste my console window but that wouldn't be geek enough.
Thanks, Paul
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Paul Taylor Sent: Sunday, October 10, 2004 10:40 PM To: [email protected] Subject: Command Question
Anyone know a linux command (or Solaris) that copies console / SSH sessions input/output and stores it in a text file for later retrieval?
Basically, I want to do some linux studies at home then e-mail the text file to my instructor that shows all my input and output.
Tried sending this to kulua-l, and never saw it go out, so here it is again with Paul as well:
You're probably thinking of "script" [/usr/bin/script].
Executing script on the command line with no arguments will create a file named "typescript" in your current directory. You may specify the file as well [ala script /home/d00d/what_i_did]. Once you are finished, a simple "exit" or CTRL+D stops logging.
Hope this helps, Dustin
On Linux, can't you just run ssh with an option for logging? On a GUI configed client like PuTTY, it should be straight-forward. There is a menu item for logging. I've looked through some SSH man pages and not seen an option for this. It doesn't look like kssh has this, nor does gssh. Someone has more knowledge of ssh, may know if it has this built-in. I did run across the script command as Dustin described. Is this available on Linux and Solaris?
openslog: a patch for openssh to allow session capturing + separate player http://deresz.net/openslog/openssh-slog.tar.gz
Dustin Decker wrote:
-----Original Message----- From: kclug-bounces[] On Behalf Of Paul Taylor Sent: Sunday, October 10, 2004 10:40 PM To: [email protected] Subject: Command Question
Anyone know a linux command (or Solaris) that copies console / SSH sessions input/output and stores it in a text file for later retrieval?
Basically, I want to do some linux studies at home then e-mail the text file to my instructor that shows all my input and output.
Tried sending this to kulua-l, and never saw it go out, so here it is again with Paul as well:
You're probably thinking of "script" [/usr/bin/script].
Executing script on the command line with no arguments will create a file named "typescript" in your current directory. You may specify the file as well [ala script /home/d00d/what_i_did]. Once you are finished, a simple "exit" or CTRL+D stops logging.
Hope this helps, Dustin
On Mon, Oct 11, 2004 at 11:12:06AM -0500, Brian Kelsay wrote:
On Linux, can't you just run ssh with an option for logging?
The recommendation to use the "script" command is right on the money.
The other thing I expect is in wide use for this sort of thing is GNU screen. It has toggle-able logging, as well as a host of other very cool features (my recent favorite: the ability to copy-and-paste from the scrollback buffer without needing to use the mouse).
If I start a shell session to do anything but the most trivial task, and don't start a screen session either around it or within it, I invariably regret not running screen. It's a real use-it-all-the-time-every-day type of tool.
Between 'script' and 'screen', the bases are pretty well covered. I expect any command-line junkie who uses anything else (in a Unix-ish environment, at least) either has some very unusual and specific needs, or doesn't know about these two tools.