Переглянути джерело

sftp: Fix Host keys

multi_domain
ßingen 7 роки тому
джерело
коміт
5638f9cb22
3 змінених файлів з 8 додано та 3 видалено
  1. +1
    -1
      images/sftp/Dockerfile
  2. +1
    -1
      images/sftp/Dockerfile.template
  3. +6
    -1
      images/sftp/docker-entrypoint.sh

+ 1
- 1
images/sftp/Dockerfile Переглянути файл

# Install dependencies # Install dependencies
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \
openssh-server \
openssh-server openssl \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*


COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh

+ 1
- 1
images/sftp/Dockerfile.template Переглянути файл

# Install dependencies # Install dependencies
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \
openssh-server \
openssh-server openssl \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*


COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh

+ 6
- 1
images/sftp/docker-entrypoint.sh Переглянути файл

chown ${PAPERLESS_FTP_USER} ${PAPERLESS_CONSUMPTION_DIR} chown ${PAPERLESS_FTP_USER} ${PAPERLESS_CONSUMPTION_DIR}
chmod 777 ${PAPERLESS_CONSUMPTION_DIR} chmod 777 ${PAPERLESS_CONSUMPTION_DIR}


# Copy Server Public key if any (this is needed at least for Brother ADS-2400n)
# Copy Server Host key if any (this is needed at least for Brother ADS-2400n)
if [[ -s ${PAPERLESS_CONSUMPTION_DIR}/ssh_host_rsa_key.pub ]]; then if [[ -s ${PAPERLESS_CONSUMPTION_DIR}/ssh_host_rsa_key.pub ]]; then
cp ${PAPERLESS_CONSUMPTION_DIR}/ssh_host_rsa_key.pub /etc/ssh/; cp ${PAPERLESS_CONSUMPTION_DIR}/ssh_host_rsa_key.pub /etc/ssh/;
fi fi
if [[ -s ${PAPERLESS_CONSUMPTION_DIR}/ssh_host_rsa_key ]]; then
cp ${PAPERLESS_CONSUMPTION_DIR}/ssh_host_rsa_key /etc/ssh/;
fi
sed -i 's/#HostKey \/etc\/ssh\/ssh_host_rsa_key/HostKey \/etc\/ssh\/ssh_host_rsa_key/g' /etc/ssh/sshd_config
echo "HostKeyAlgorithms ssh-rsa" >> /etc/ssh/sshd_config


# https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/45234 # https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/45234
mkdir -p /var/run/sshd mkdir -p /var/run/sshd

Завантаження…
Відмінити
Зберегти