[PATCH] Bye bye "No response from server" - add ssh error logging
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
LTSP5 |
Fix Released
|
Medium
|
Jakob Unterwurzacher |
Bug Description
This should make debugging login issues somewhat easier.
Patch is attached - commit message reproduced below:
Subject: [PATCH] Bye bye "No response from server" - add ssh error logging
ldm now reads the full output from ssh even if it dies on the way.
Proper error messages are logged and displayed, wrapped in _() so
they can be localized.
Messages we get:
* Permission denied (publickey,
The common case of a password typo or invalid user.
We make sure we read all the output BEFORE checking if the child has
died. Also, we handle EINTR, as this is what select() returns when it
gets SIGCHLD.
* ssh: connect to host server port 22: Connection timed out
For that to work, ConnectTimeout=10 is set on the ssh command line.
Otherwise the 30 second timeout elapses before ssh tells us what is
going on.
* ssh: connect to host server port 22: Connection refused
That message contains a ": " like the password prompt. This is solved
by waiting for 200ms of silence before searching for the prompt (polling
interval reduced from 1s to 200ms to not bore the user).
In the error case, ssh will have exited in the meantime, and we know
for sure that it was NOT a password prompt.
Related branches
Changed in ltsp: | |
importance: | Undecided → High |
status: | New → Confirmed |
Changed in ltsp: | |
status: | Fix Committed → Fix Released |
Proposed merge https:/ /code.launchpad .net/~jakobunt/ ltsp/ldm- log-v2/ +merge/ 235541