is/jsch

java.net.SocketException: Socket is not connected (Read failed)

majumdartanmay opened this issue · 0 comments

We are using jsch 0.1.54. We use it to simply create a SSH connection with a remote SSH server with PAM enabled in our application (Let's call it Application ALPHA)
Now, our current code is working fine for all our users. However, recently one user is getting
Session.connect: java.net.SocketException: Socket is not connected (Read failed)

This user simply uses a username and password authentication. Now, this user has VPN via which client can talk to SSH . But we have ruled out a server issue, since other clients/products are able to connect to the SSH server and the application ALPHA is also able to connect to the same SSH server in a different machine and using a different username . The user was not able to test using his credentials on a different machine due to various compliance issues.

I am listing out the properties that we use

final Properties pty= new Properties();
pty.put("StrictHostKeyChecking", "no");
pty.put("PreferredAuthentications", "publickey,password,keyboard-interactive");

What can be the different reason for this to happen, since we have been unable to recreate this as of now.