So, I have this class that uses the org.apache.commons.net.telnet.TelnetClient class. It attempts to send commands and read the response.
public class Automa
We have this problem also in our use of the java TelnetClient. It is inconsistent whether the telnet server returns the sent command in its responses.
What we are doing currently to make sure the command is not included in the response data is sending the stty command to the telnet session to turn off terminal echoing. This works for telnet servers running on linux and if the command is entered in the bash shell:
stty -echo