Search code examples
javatelnetjsch

Telnet support in JSch


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?


Solution

  • 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.