Skip to content

sshd: Too many authentication failures #134

@skyblaster

Description

@skyblaster

Using the instructions at https://sonic.software/ to launch the sonic-vs image in QEMU, SSH fails to connect to master and 202405 builds with the following error:

❯ ssh admin@localhost -p 5555
Debian GNU/Linux 12 \n \l

Received disconnect from 127.0.0.1 port 5555:2: Too many authentication failures
Disconnected from 127.0.0.1 port 5555

Comparing the relevant parts of /etc/ssh/sshd_config, it appears that MaxAuthTries is set to too low of a value. If I increase this to 6 (the commented value), or remove the line completely, then it is possible to make a connection.

202311 builds:

# Close inactive client sessions after 15 minutes
ClientAliveInterval 900
ClientAliveCountMax 0
LogLevel VERBOSE

Master and 202405 builds

# Close inactive client sessions after 5 minutes
ClientAliveInterval 300
ClientAliveCountMax 0
MaxAuthTries 3
Banner /etc/issue
LogLevel VERBOSE

I suspect this is a result of the bump from Debian 11 to 12.
It's possible that #99 contains a fix, but I haven't tested the patches to confirm.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions