Closed GoogleCodeExporter closed 9 years ago
I suppose my problem is related to this reported issue.
When I use the Connection.authenticateWithPublicKey(...) method, it does not
work for local IP addresses:
Authentication failed.
java.lang.IllegalStateException: Cannot open session, connection is not
authenticated.
at ch.ethz.ssh2.Connection.openSession(Connection.java:1095) // -> without patch
at ch.ethz.ssh2.Connection.openSession(Connection.java:1120) // -> with patch
at trial.main(trial.java:52)
There is no problem with the connections to remote addresses, or when I use the
Linux ssh command in CLI, or Connection.authenticateWithPassword(...).
I also applied the suggested patch, but did not help. Could it be a different
issue?
Thanks!
Original comment by levente....@gmail.com
on 14 Mar 2014 at 9:17
Your issue is probably something else. I'm not sure what you mean with local IP
address in your context, but it sound like you have problems when you connect
to IP for an interface on your own machine.
In some scenarios with firewalls etc, these will filter out IP packages with
wrong source addresses. The proposed bindSourceAddress() method is used before
connect() to bind the local address to the socket before connecting to a
"remote" address. This to be able to have a allowed source address for these
firewalls.
Since you can connect "remotely", this is probably not your issue.
Original comment by tobb...@gmail.com
on 14 Mar 2014 at 10:12
Original comment by dkocher@sudo.ch
on 8 Apr 2014 at 11:29
Original issue reported on code.google.com by
tobb...@gmail.com
on 4 Feb 2014 at 12:16Attachments: