Using telnet to determin which service is running in ruby?

Hi,
how can I get the servers response-message with net::telnet? Wether
dump_log nor output_log are giving them. I mean if I try something like
this just in ruby:

$(sleep 1; exit) | telnet ubuntuforums.org 22
Trying 82.211.81.186…
Connected to ubuntuforums.org.
Escape character is ‘^]’.
SSH-2.0-OpenSSH_4.6p1 Debian-5.CAT
Connection closed by foreign host.

I get the information on this certain port is running:
SSH-2.0-OpenSSH_4.6p1 Debian-5.CAT.

But the net::telnet logs don’t give this information. They are just
reporting: “Trying to connect to ubuntuforums.org” and “Connected to
ubuntuforums.org” but not which service is running. Is there another way
in ruby to get it?