Browse Source

fix: Adapt SFTP config to old OpenSSH

To make it work with Brother ADS-2400N scanner
master
Bingen Eguzkitza 1 day ago
parent
commit
d973b851c1
2 changed files with 9 additions and 0 deletions
  1. +1
    -0
      images/nextcloud/docker-entrypoint.sh
  2. +8
    -0
      images/sftp/docker-entrypoint.sh

+ 1
- 0
images/nextcloud/docker-entrypoint.sh View File

@@ -39,6 +39,7 @@ fi

function check_result {
if [ $1 != 0 ]; then
echo "";
echo "Error $1: $2";
exit 1;
fi

+ 8
- 0
images/sftp/docker-entrypoint.sh View File

@@ -19,6 +19,14 @@ 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://www.leonardw.de/en/blog/brother-ads-2400n-paperless-ngx/
# Force old algorithms that the scanner (OpenSSH 6.0) understands
echo "KexAlgorithms diffie-hellman-group14-sha1" >> /etc/ssh/sshd_config
echo "Ciphers aes128-cbc,aes256-cbc,3des-cbc" >> /etc/ssh/sshd_config
echo "MACs hmac-sha1" >> /etc/ssh/sshd_config
echo "HostKeyAlgorithms +ssh-rsa" >> /etc/ssh/sshd_config
echo "PubkeyAcceptedAlgorithms +ssh-rsa" >> /etc/ssh/sshd_config

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


Loading…
Cancel
Save