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

feat: ssh configurable number of public key attempts before failing #3739

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions services/ssh/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

export USER_ID=$(id -u)

ep /etc/ssh/sshd_config

ep /home/token.sh
ep /home/grant.sh
ep /home/token-debug.sh
Expand Down
5 changes: 4 additions & 1 deletion services/ssh/etc/ssh/sshd_config
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ HostKey /etc/ssh/ssh_host_ed25519_key

LogLevel INFO

# Sets the allowed number of ssh-agent key attempts before failure
MaxAuthTries ${MAX_AUTH_TRIES:-6}

PermitRootLogin no

# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
Expand Down Expand Up @@ -39,4 +42,4 @@ ClientAliveInterval 60
ClientAliveCountMax 1440 # max keepalive of 24h

# This will allow sftp access
Subsystem sftp sftp-server -u 0002
Subsystem sftp sftp-server -u 0002