mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Order of keys matter, ed25519 is recommended
This commit is contained in:
parent
3d81f032e9
commit
f295c83fd3
2 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ ip=$(hostname --all-ip-address)
|
||||||
|
|
||||||
# Fetch SSH fingerprints
|
# Fetch SSH fingerprints
|
||||||
i=0
|
i=0
|
||||||
for key in $(ls /etc/ssh/ssh_host_{rsa,ecdsa,ed25519}_key.pub 2> /dev/null) ; do
|
for key in $(ls /etc/ssh/ssh_host_{ed25519,rsa,ecdsa}_key.pub 2> /dev/null) ; do
|
||||||
output=$(ssh-keygen -l -f $key)
|
output=$(ssh-keygen -l -f $key)
|
||||||
fingerprint[$i]=" - $(echo $output | cut -d' ' -f2) $(echo $output| cut -d' ' -f4)"
|
fingerprint[$i]=" - $(echo $output | cut -d' ' -f2) $(echo $output| cut -d' ' -f4)"
|
||||||
i=$(($i + 1))
|
i=$(($i + 1))
|
||||||
|
|
|
@ -16,7 +16,7 @@ do_pre_regen() {
|
||||||
|| sed -i "s/ListenAddress ::/#ListenAddress ::/g" sshd_config
|
|| sed -i "s/ListenAddress ::/#ListenAddress ::/g" sshd_config
|
||||||
|
|
||||||
# Support legacy setting (this setting might be disabled by a user during a migration)
|
# Support legacy setting (this setting might be disabled by a user during a migration)
|
||||||
ssh_keys=$(ls /etc/ssh/ssh_host_{rsa,ecdsa,ed25519}_key 2>/dev/null)
|
ssh_keys=$(ls /etc/ssh/ssh_host_{ed25519,rsa,ecdsa}_key 2>/dev/null)
|
||||||
if [[ "$(yunohost settings get 'service.ssh.allow_deprecated_dsa_hostkey')" == "True" ]]; then
|
if [[ "$(yunohost settings get 'service.ssh.allow_deprecated_dsa_hostkey')" == "True" ]]; then
|
||||||
ssh_keys="$ssh_keys $(ls /etc/ssh/ssh_host_dsa_key 2>/dev/null)"
|
ssh_keys="$ssh_keys $(ls /etc/ssh/ssh_host_dsa_key 2>/dev/null)"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue