Skip to content

Commit

Permalink
Merge pull request #3739 from uselagoon/ssh-max-auth-retries
Browse files Browse the repository at this point in the history
feat: ssh configurable number of public key attempts before failing
  • Loading branch information
tobybellwood authored Nov 7, 2024
2 parents ca99b8b + c50e8f1 commit f13dd62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit f13dd62

Please sign in to comment.