How to Write Telnet Output to Fileby 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.
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."
Type "telnet" at the command line.
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."
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 192.168.1.1 80" to open a connection with the server at 192.168.1.1 on port 80. The output of your telnet session is saved to the text file you specified.
- If you do not enter a port number when you connect to a server with telnet, the program uses the default telnet port 23.
- You can download free telnet clients like Putty or Poderosa that provide a graphic user interface for your telnet sessions.
- Telnet is not automatically available with a default installation of Windows 7. To turn on the telnet client, go to the Control Panel, click "Programs" and then click "Turn Windows Features On or Off." Click the "Telnet Client" check box and click "OK."