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

Fix for error AuthorizedKeysCommand signal 13 #685

Merged
merged 1 commit into from
Dec 5, 2022

Conversation

scimerman
Copy link
Contributor

@scimerman scimerman commented Dec 5, 2022

As discussed before, the sshd exits when finds the key already matches, while the bash script still is in the process printing out all of the keys. When this happened, the sshd kills the pipe, and so bash script gets an error signal 13. Sshd then still checks the return value, and since it is > 0 it stops the login. This issue occurred to only some users (probably somehow connected with the ssh client version), but for those it was approximately quarter sessions failed.
The proposed solution wraps the script's last part, where only the key printing is happening. It catches any problematic output and exits gracefully.

Running longer test over weekend, ended up in 47 errored out of 90k successful connections.

Deployed on Hyperchicken ✔️

@pneerincx pneerincx merged commit 61f3f0e into rug-cit-hpc:develop Dec 5, 2022
@scimerman scimerman deleted the login branch January 19, 2023 15:09
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

Successfully merging this pull request may close these issues.

2 participants