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

Provide more SSH output if connection fails #451

Open
Ma27 opened this issue Apr 26, 2024 · 0 comments
Open

Provide more SSH output if connection fails #451

Ma27 opened this issue Apr 26, 2024 · 0 comments

Comments

@Ma27
Copy link
Member

Ma27 commented Apr 26, 2024

I've seen output like this a few times already

redacted00: Connecting via ssh (1/3)
redacted01: Connecting via ssh (2/3)
redacted10: Connecting via ssh (3/3)
Connection closed by UNKNOWN port 65535
Connection closed by UNKNOWN port 65535
Connection closed by UNKNOWN port 65535
Connection closed by UNKNOWN port 65535
Connection closed by UNKNOWN port 65535
Connection closed by UNKNOWN port 65535
Connection closed by UNKNOWN port 65535
ERROR: Unexpected exception
<traceback>
    execnet.gateway_bootstrap.HostNotFound: redacted00.fcio.net

There are a few causes for that issue:

  • the private key is missing a trailing newline and SSH can't load it
  • failing hostkey verification
    ...and probably more

The output shown above makes diagnosing this very hard. At the very least I'd like to see the error from SSH.

Additionally

  • the backtrace doesn't serve any value here, so it would be cool if it could be hidden in that case.
  • often the cause for something like this is on the client-side. Perhaps we could run ssh with increased debug level (or make this configurable) and capture the debug-output silently. Then, if the connection fails, print the output above the error message.
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