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

large scale systems have very slow ssh performance tied to reading /root/.ssh/known_hosts #123

Open
dmjacobsen opened this issue Apr 21, 2023 · 1 comment

Comments

@dmjacobsen
Copy link

during a recent full shutdown of a large scale systems we determined that it was taking up to 20 minutes to generate paramiko ssh connection objects. this time was brought close to zero by removing .ssh/known_hosts. It would seem that parsing that file can be very slow. Suggest simply never loading .ssh/known_hosts (which is not fully correct anyway, site keys should be in /etc/ssh/ssh_known_hosts), and then just using an AutoAddPolicy instead of the current WarnPolicy since it will be known that paramiko is unaware of the correct keys.

@haasken-hpe
Copy link
Contributor

@dmjacobsen, can you share more information about what was in your .ssh/known_hosts file?

I'd like to try to reproduce this issue if possible, so we can try to validate a fix. I also heard mention that there may have been some impact due to certain names not being resolvable by DNS during the shutdown. Can you share any more information about that as well.

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

2 participants