Local port forwarding: how to detect that no process is listening on remote port?

Mar 21, 2014 at 10:22 AM
Hello,

I ran into this problem while forwarding local port X (client:X) to port Y of the ssh server (server:Y): even if no process is listening on port Y on the ssh server, I can still connect to client:X (which is normal) and I don't get error messages nor exceptions concerning the fact that ssh.net can't connect to server:Y (and this is less normal).

I can even send data to the connected socket without error messages.

Do you know if there is a way to detect this situation? Maybe I neglected something?

Thanks a lot for your help,
Alberto.