Skip to content

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

@dmjacobsen

Description

@dmjacobsen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions