Log linux telnet sessions

So I was doing some research on how to turn on logging for a telnet session on a linux box and I found this article. Basically it suggests that the user look into the script command.

I read the man page and found that script is actually pretty badass. Rather than building logging into your telnet application, why not build a wrapper that you can use with any program? That's what script is. Just run the command tell it where to output the data.

script -c "telnet myhost.domain.com" /tmp/output.log
Leave A Reply - 7 Replies
Replies
May 1st 2006 - Jeff Jacobs

Thanks for posting this info. I knew nothing of script and it is exactly what I needed. I am a software engineer having done mostly embedded software til now. I needed a way to log a telnet session for talking to one of our devices which had a telnet server that reports commands of a proprietary protocol. I tried the -n option of telnet and I still do not know what this option accomplishes. The script commands works perfectly. Thanks again!

June 18th 2006 - PJ

Thank you for this valueable tip!

Piotr

March 16th 2009 - Pimi

Really helpful! Thanks a lot.

November 18th 2009 - nono

Cheers, that was what I am looking for.

December 9th 2010 - Kojta

Thanks, very helpful! :)

May 28th 2011 - iCEMAN

Thank you :P

August 10th 2012 - yassine

Thank you so much ^_^

All content licensed under the Creative Commons License