Telnet support in JSch

2019-08-10 09:51发布

问题:

I'm currently building a Java application which will connect to a switch using Telnet or SSH. I'm currently using the JSch for the SSH connection, but I read in Stack Overflow question SSH and Telnet library for java that JSch also supports Telnet.

Is this correct? And if so, could some one provide a small example?

回答1:

The JSch is an SSH library.

Quoting the JSch web page:

JSch is a pure Java implementation of SSH2.

No mention on Telnet.


Also, there's no mention of the "telnet" or "23" in the JSch source code.

The only classes that connect anywhere (= use Socket Java class) are Session (SSH), Proxy* and ChannelForwardedTCPIP (port forwarding) and ChannelX11.



标签: java telnet jsch