diff --git a/files/entrypoint b/files/entrypoint index 6770fe95..393a5407 100755 --- a/files/entrypoint +++ b/files/entrypoint @@ -71,15 +71,7 @@ if [ ! -f "$userConfFinalPath" ]; then # Generate unique ssh keys for this container, if needed if [ ! -f /etc/ssh/ssh_host_ed25519_key ]; then - ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N '' - fi - if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then - ssh-keygen -t rsa -b 4096 -f /etc/ssh/ssh_host_rsa_key -N '' - fi - - # Restrict access from other users - chmod 600 /etc/ssh/ssh_host_ed25519_key || true - chmod 600 /etc/ssh/ssh_host_rsa_key || true + ssh-keygen -A fi # Source custom scripts, if any diff --git a/files/sshd_config b/files/sshd_config index 1308c8b2..01f89a7f 100644 --- a/files/sshd_config +++ b/files/sshd_config @@ -3,6 +3,7 @@ Protocol 2 HostKey /etc/ssh/ssh_host_ed25519_key HostKey /etc/ssh/ssh_host_rsa_key +HostKey /etc/ssh/ssh_host_ecdsa_key # Faster connection # See: https://github.com/atmoz/sftp/issues/11