I am currently using JSCH to connect through SSH to a remote server(let's say 126.96.36.199). I would like to use port forwading to connect to a PC which is connected locally to the remote server. I am using the setPortForwardingL() function in two cases:
I am able to connect to the local PC(192.168.0.2) using telnet on port 40023, but when I try to connect with an FTP client(WinSCP or FileZilla) it hangs after the "PASSIVE mode" message, as is showed in the below message:
Status: Resolving address of localhost
Status: Connecting to 127.0.0.1:40021…
Status: Connection established, waiting for welcome message…
Response: 220 Welcome to the FTP service.
Command: USER oracle
Response: 331 Please specify the password.
Command: PASS ********
Response: 230 Login successful.
Response: 215 UNIX Type: L8
Response: REST STREAM
Response: 211 End
Status: Retrieving directory listing…
Response: 257 "/"
Command: TYPE I
Response: 200 Switching to Binary mode.
Response: 227 Entering Passive Mode (10,8,0,58,57,70)
It hangs there and then gives me an error message. I believe it has to do something with that the response packets sent from the local server to the remote server, which are not forwarded back to my application through the SSH channel. Any help is appreciated.
Thanks in advance,
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.