After enable Virtual Serial Port over network using telnet protocol on ESX 6.5,
when using Python telnetlib library to do telnet connection,
ESX telnet server would echo back '\xff\xfd%' after the first write.
After digging into RFC 854 - Telnet Protocol Specification ,
'\xff\xfd%' is IAC DO command.
Is there any easy way I can config Virtual Serial Port telnet server from ESX server to disable the echo?
Here's a sample Python script to try:
import time
import telnetlib
HOST = "172.18.125.43"
PORT = "7004"
tn = telnetlib.Telnet(HOST, PORT)
tn.set_debuglevel(10)
for i in range(5):
tn.write("\n")
time.sleep(1)
tn.read_very_eager()
tn.close()
Example output:
Telnet(172.18.125.43,7004): send '\n'
Telnet(172.18.125.43,7004): recv '\xff\xfd%\r\n\r\nLogin: '
Telnet(172.18.125.43,7004): IAC DO 37
Telnet(172.18.125.43,7004): send '\n'
Telnet(172.18.125.43,7004): recv '%\r\nPassword: '
Telnet(172.18.125.43,7004): send '\n'
Telnet(172.18.125.43,7004): recv '\r\n'
Telnet(172.18.125.43,7004): send '\n'
Telnet(172.18.125.43,7004): recv '\r\n'
Telnet(172.18.125.43,7004): send '\n'
Telnet(172.18.125.43,7004): recv '\r\n'
To confirm what is being done, you are configuring a Serial port to a virtual machine or to the ESXi host?
I'm configuring a Virtual Serial Port to a virtual machine.
It looks like there's noe way to turn off the echo of control-stream "FF FD 25".
Eventually, we add extra handling to expect the control-stream.