简体   繁体   English

开源Telnet Java API

[英]Open source Telnet Java API

Is there an open source telnet API/library out there for Java (something like Python telnetlib)? 是否有针对Java的开源telnet API /库(类似于Python telnetlib)? I need to connect to a server using telnet and execute some commands from within a Java program. 我需要使用telnet连接到服务器并从Java程序中执行一些命令。

My preference is to use the Apache Commons-Net library. 我的偏好是使用Apache Commons-Net库。 http://commons.apache.org/net/ It supports many client protocols, including Telnet. http://commons.apache.org/net/它支持许多客户端协议,包括Telnet。

I've used this in the past and it works quite well. 我过去曾经使用过它,效果很好。

Maybe is worth considering using SSH protocol, instead of Telnet. 也许值得考虑使用SSH协议,而不是Telnet。 Telnet is much less secure, for instance all the data is transmitted as plain text (including your passwords). Telnet安全性较低,例如所有数据都以纯文本(包括您的密码)传输。

Sure is. 当然可以。

http://sourceforge.net/projects/jtelnet/ (EDIT: Noted as crap.) http://sourceforge.net/projects/jtelnet/ (编辑:注意到废话。)

Here is an Apache project which is presumably much more handy: 这是一个Apache项目,可能更方便:

http://commons.apache.org/net/ http://commons.apache.org/net/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM