EthernetServer telnetServer(23);
telnetServer.begin();
Wow this not a way to run both client and server on same machine.
I don't see where telnet comes into place in the TelnetClient example.
Actually now Serial Port your cmd line
while (Serial.available() > 0) {
char inChar = Serial.read();
if (client.connected()) {
client.print(inChar);
}
}