How to Write Telnet Output to File

By Ken White

The telnet protocol, developed in 1973, is a terminal service used to connect to a remote computer over a network. It has been replaced for the most part by SSH, an encrypted protocol for security, although Microsoft still includes the telnet command-line client with Windows. The telnet client lets you set the terminal type you're emulating, turn local echo on or off to display what you type to the screen, and log your session to a text file on your computer for later review.

Step 1

Press and hold the "Windows" key on your keyboard and press "R" to open a Run box. Type "cmd" (without quotes) in the "Open" text field, then press "Enter" or click "OK."

Step 2

Type "telnet" at the command line.

Step 3

Type "set logfile filename" where "filename" is the name of the file you will use to log the telnet session. For example, if you want to save your log to a text file called "website.txt," type "set logfile website.txt" and press "Enter."

Step 4

Type "open hostip port" where "hostip" is the IP address of the computer to which you are connecting and "port" is the port number for the connection. For example, type "open 80" to open a connection with the server at on port 80. The output of your telnet session is saved to the text file you specified.