aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2015-04-04 23:09:54 -0700
committerKenny Root <kenny@the-b.org>2015-04-05 16:02:50 -0700
commitbe562fe3c5c6f47d78724de8221974acec389a4f (patch)
tree664892302b961bcfa0cccaf5edc4dfb8f04551bd
parentc7032050b30cd7e4bbb7323a821cf236d2b64cf1 (diff)
downloadconnectbot-be562fe3c5c6f47d78724de8221974acec389a4f.tar.gz
connectbot-be562fe3c5c6f47d78724de8221974acec389a4f.tar.bz2
connectbot-be562fe3c5c6f47d78724de8221974acec389a4f.zip
Provide more context for SSH connection failures
Since the Trilead SSH stack throws IOException on failures and then higher levels of the stack catch those, we need to descend into the causes of each Exception to give the user more context. Unfortunately this information is not localized. Change-Id: I8b1fdf9eab65e5d2f6f1956562cbf9f56a2adb9d
-rw-r--r--CHANGELOG.md4
-rw-r--r--src/org/connectbot/transport/SSH.java6
2 files changed, 9 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 895d821..ddfccf0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,3 +6,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
- Key exchange and host key algorithm preference order was not being
respected.
+
+### Added
+- More context is given for failures to connect via SSH which should
+ reveal why a host might be incompatible with ConnectBot.
diff --git a/src/org/connectbot/transport/SSH.java b/src/org/connectbot/transport/SSH.java
index c5103f5..ab1ca4c 100644
--- a/src/org/connectbot/transport/SSH.java
+++ b/src/org/connectbot/transport/SSH.java
@@ -454,7 +454,11 @@ public class SSH extends AbsTransport implements ConnectionMonitor, InteractiveC
Log.e(TAG, "Problem in SSH connection thread during authentication", e);
// Display the reason in the text.
- bridge.outputLine(e.getCause().getMessage());
+ Throwable t = e.getCause();
+ do {
+ bridge.outputLine(t.getMessage());
+ t = t.getCause();
+ } while (t != null);
close();
onDisconnect();