Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
majumdartanmay opened this issue Sep 27, 2021 · 0 comments
Open

Comments

@majumdartanmay
Copy link

majumdartanmay commented Sep 27, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant