Do you necessary have to run telnet? I think timeout(1) will help you.
Alternative #1:
Use timeout, which is part of GNU coreutils. This won't confirm if you were able to establish a connection or not.
TIMEOUT=10 timeout $TIMEOUT telnet <host> <port>
Alternative #2:
Use Bash/Perl/Python to solve the same problem, with more or less granularity.
A few examples:
Bash: TIMEOUT=10; telnet <host> <port> 2>&1 >/dev/null & WPID=$!; sleep $TIMEOUT && kill $! & KPID=$!; wait $WPID
Perl: perl -e "alarm 10; exec @ARGV" "telnet my.server.com 23"
Python: python -c 'import telnetlib;HOST="my.server.com"; PORT=23; TIMEOUT=10; PATTERN="Login: "; t = telnetlib.Telnet (HOST, PORT); t_read = t.read_until(PATTERN, TIMEOUT); print(repr(t_read))'
nmap
available on server ? Or just write a simpleperl
script, e.g. perlmonks.org/?node_id=571066