add ed25519 key generation
This commit is contained in:
parent
3905a71c1d
commit
ed21775315
1 changed files with 8 additions and 2 deletions
|
@ -8,7 +8,7 @@ get_fingerprint() {
|
||||||
display_fingerprints() {
|
display_fingerprints() {
|
||||||
local keyfile
|
local keyfile
|
||||||
|
|
||||||
for keyfile in "/etc/dropbear/dropbear_rsa_host_key" "/etc/dropbear/dropbear_ecdsa_host_key" ; do
|
for keyfile in "/etc/dropbear/dropbear_rsa_host_key" "/etc/dropbear/dropbear_ecdsa_host_key" "/etc/dropbear/dropbear_ed25519"; do
|
||||||
if [ -s "${keyfile}" ] ; then
|
if [ -s "${keyfile}" ] ; then
|
||||||
echo "$(basename "${keyfile}") : $(get_fingerprint "${keyfile}")"
|
echo "$(basename "${keyfile}") : $(get_fingerprint "${keyfile}")"
|
||||||
fi
|
fi
|
||||||
|
@ -18,6 +18,7 @@ display_fingerprints() {
|
||||||
copy_openssh_keys() {
|
copy_openssh_keys() {
|
||||||
local osshrsa="/etc/ssh/ssh_host_rsa_key"
|
local osshrsa="/etc/ssh/ssh_host_rsa_key"
|
||||||
local osshecdsa="/etc/ssh/ssh_host_ecdsa_key"
|
local osshecdsa="/etc/ssh/ssh_host_ecdsa_key"
|
||||||
|
local osshed25519="/etc/ssh/ssh_host_ed25519_key"
|
||||||
|
|
||||||
local dbpre="/etc/dropbear/dropbear_"
|
local dbpre="/etc/dropbear/dropbear_"
|
||||||
|
|
||||||
|
@ -33,12 +34,17 @@ copy_openssh_keys() {
|
||||||
return_code=0
|
return_code=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -s "$osshed25519" ]; then
|
||||||
|
dropbearconvert openssh dropbear $osshed25519 ${dbpre}ed25519_host_key
|
||||||
|
return_code=0
|
||||||
|
fi
|
||||||
|
|
||||||
return $return_code
|
return $return_code
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_keys() {
|
generate_keys() {
|
||||||
local keyfile keytype
|
local keyfile keytype
|
||||||
for keytype in rsa ecdsa ; do
|
for keytype in rsa ecdsa ed25519 ; do
|
||||||
keyfile="/etc/dropbear/dropbear_${keytype}_host_key"
|
keyfile="/etc/dropbear/dropbear_${keytype}_host_key"
|
||||||
if [ ! -s "$keyfile" ]; then
|
if [ ! -s "$keyfile" ]; then
|
||||||
echo "Generating ${keytype} host key for dropbear ..."
|
echo "Generating ${keytype} host key for dropbear ..."
|
||||||
|
|
Loading…
Reference in a new issue