telnet with timeout