I need to connect a remote computer via ssh and then make a telnet connection to its port
(telnet localhost #port)
with JAVA
I tried some libraries (sshd, ganymed) and succesfully login to remote computer but cannot login to telnet. The problem is that the libraries open a ssh connection and run "one" command at a time. However telnet login is interactive. It asks for username then i'm writing it to stream (with EOF) but hangs there forever
I cannot find a proper way for implementation. Any advice?
(using linux)