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

Connection hangs on session.connect #50

Open
loomcode opened this issue Jul 5, 2023 · 0 comments
Open

Connection hangs on session.connect #50

loomcode opened this issue Jul 5, 2023 · 0 comments

Comments

@loomcode
Copy link

loomcode commented Jul 5, 2023

Connection just hangs. I'm successfully connecting with the same host, user, and port from terminal and from an implementation I wrote in python using paramiko (I'm using RSA keys, no passwords). Increasing the timeout has no effect and no exceptions are thrown. I was using version 1.55 but have also tried 1.5 to see if it's version related. I'm connecting between two linux ubuntu/mint systems if that helps.

JSch jsch = new JSch();
jsch.setKnownHosts("/home/user/.ssh/known_hosts");
Session session = jsch.getSession(this.username, this.ip, 21);
Hashtable<String, String> config = new Hashtable<String, String>();
config.put("StrictHostKeyChecking", "no");
config.put("PreferredAuthentications", "publickey");
session.setConfig(config);
session.connect(5000);
System.out.println(session.isConnected());

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