fixes sameersbn#2645

This commit is contained in:
kkkkkks0 2022-10-20 18:58:03 +08:00 committed by GitHub
parent e6def913e6
commit f408585d8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1687,7 +1687,7 @@ generate_ssh_key() {
}
generate_ssh_host_keys() {
sed -i "s|^[#]*MaxStartups 10:30:60|MaxStartups ${GITLAB_SSH_MAXSTARTUPS}|" /etc/ssh/sshd_config
sed -i "s|^[#]*MaxStartups[^$]*|MaxStartups ${GITLAB_SSH_MAXSTARTUPS}|" /etc/ssh/sshd_config
sed -i "s|#HostKey /etc/ssh/|HostKey ${GITLAB_DATA_DIR}/ssh/|g" /etc/ssh/sshd_config
if [[ ! -e ${GITLAB_DATA_DIR}/ssh/ssh_host_rsa_key ]]; then
echo -n "Generating OpenSSH host keys... "