<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">Hi, guys,<div><br></div><div>I am new for Erlang and I wonder if there are any libraries providing APIs like:</div><div><span style="font-size: 14px; line-height: 1.7; "><br></span></div><div><span style="font-size: 14px; line-height: 1.7; ">    Handle = telnet_module:connect(Ip, Port, Username, Password).</span></div><div>    {ok, Msg} = telnet_module:send(Handle, Command).</div><div>    {ok, close} = telnet_module:close(Handle).</div><div><br></div><div>Someone recommends ct_telnet, but this module seems mainly for test purpose (common test?) and associated closely with eunit. And I can't find any documents about how to configure the target server(including ip, port, username, password, etc.). Some examples show they are specified in a configuration file, but I am not quite sure.</div><div><br></div><div>There is also a getty.erl (http://ftp.sunet.se/pub/lang/erlang/examples/small_examples/getty.erl), but I find it is actually a tcp server and has nothing to do with connecting to a telnet server.</div><div><br></div><div>Maybe I can use "telnet" command of shell as the client and use open_port/port_command/port_close to communicate with remote peer?</div><div><br></div><div>Thanks a lot!</div></div></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>