2

Is there a way to increase verbosity for the telnet command?

man telnet does not show any -v or -vv options.

  • Does -d do anything for you? – Jeff Schaller Oct 18 '17 at 20:28
  • 1
    What are you trying to debug? Would netcat be of any use? – roaima Oct 18 '17 at 22:54
  • @roaima: I was trying to check if a port is open and responding. telnet is probably the wrong tool for it, and netcat would be more appropriate, but telnet is usually already present on plain vanilla boxes. – ccpizza Oct 20 '17 at 14:42
5

On my debian telnet-ssl version 0.17-41:

$ telnet
telnet> help
Commands may be abbreviated.  Commands are:
[...]
set         set operating parameters ('set ?' for more)
telnet> set ?
[...]
debug           enable debugging
netdata         enable printing of hexadecimal network data (debugging)
prettydump      enable output of "netdata" to user readable format (debugging)
options         enable viewing of options processing (debugging)
termdata        enable (debugging) toggle printing of hexadecimal terminal data
telnet> set options
Will show option processing.
telnet> open 10.1.2.3
Trying 10.1.2.3...
Connected to 10.1.2.3.
Escape character is '^]'.
SENT WILL NEW-ENVIRON
SENT WILL AUTHENTICATION
SENT DO SUPPRESS GO AHEAD
SENT WILL TERMINAL TYPE
SENT WILL NAWS
SENT WILL TSPEED
SENT WILL LFLOW
SENT WILL LINEMODE
SENT DO STATUS
SENT WILL XDISPLOC
RCVD DO TERMINAL TYPE
RCVD DO TSPEED
RCVD DO XDISPLOC
RCVD DO NEW-ENVIRON
RCVD DONT AUTHENTICATION
[SSL not available]
RCVD WILL SUPPRESS GO AHEAD
RCVD DO NAWS
SENT IAC SB NAWS 0 80 (80) 0 24 (24)
RCVD DO LFLOW
RCVD DONT LINEMODE
RCVD WILL STATUS
RCVD IAC SB TERMINAL-SPEED SEND
SENT IAC SB TERMINAL-SPEED IS 38400,38400
RCVD IAC SB X-DISPLAY-LOCATION SEND
SENT IAC SB X-DISPLAY-LOCATION IS "mypc:0.0"
RCVD IAC SB ENVIRON SEND 
SENT IAC SB ENVIRON IS VAR "DISPLAY" VALUE "mypc:0.0"
RCVD IAC SB TERMINAL-TYPE SEND
SENT IAC SB TERMINAL-TYPE IS "xterm-256color"
RCVD DO ECHO
SENT WONT ECHO
RCVD WILL ECHO
SENT DO ECHO
Debian GNU/Linux 9
stretch-amd64 login: 

THe debug (-d) option doesn't appear useful. It sets a socket option SO_DEBUG and requires root.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.