mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-19 14:56:46 +02:00
``` * Generating DSS-Hostkey... Unknown key type 'dss' Usage: /usr/bin/dropbearkey -t <type> -f <filename> [-s bits] -t type Type of key to generate. One of: rsa ecdsa ed25519 -f filename Use filename for the secret key. ~/.ssh/id_dropbear is recommended for client keys. -s bits Key size in bits, should be a multiple of 8 (optional) ECDSA has sizes 256 384 521 Ed25519 has a fixed size of 256 bits -y Just print the publickey and fingerprint for the private key in <filename>. -C Specify the key comment (email). ```
38 lines
1 KiB
Bash
38 lines
1 KiB
Bash
#!/sbin/openrc-run
|
|
# Copyright 1999-2004 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
# $Header: /var/cvsroot/gentoo-x86/net-misc/dropbear/files/dropbear.init.d,v 1.2 2004/07/14 23:57:35 agriffis Exp $
|
|
|
|
depend() {
|
|
use logger dns
|
|
need net
|
|
after firewall
|
|
}
|
|
|
|
check_config() {
|
|
if [ ! -e /etc/dropbear/dropbear_rsa_host_key ] ; then
|
|
einfo "Generating RSA-Hostkey..."
|
|
/usr/bin/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
|
|
fi
|
|
if [ ! -e /etc/dropbear/dropbear_ecdsa_host_key ] ; then
|
|
einfo "Generating ECDSA-Hostkey..."
|
|
/usr/bin/dropbearkey -t ecdsa -f /etc/dropbear/dropbear_ecdsa_host_key
|
|
fi
|
|
if [ ! -e /etc/dropbear/dropbear_ed25519_host_key ] ; then
|
|
einfo "Generating ED25519-Hostkey..."
|
|
/usr/bin/dropbearkey -t ed25519 -f /etc/dropbear/dropbear_ed25519_host_key
|
|
fi
|
|
}
|
|
|
|
start() {
|
|
check_config || return 1
|
|
ebegin "Starting dropbear"
|
|
/usr/sbin/dropbear ${DROPBEAR_OPTS}
|
|
eend $?
|
|
}
|
|
|
|
stop() {
|
|
ebegin "Stopping dropbear"
|
|
start-stop-daemon --stop --pidfile /var/run/dropbear.pid
|
|
eend $?
|
|
}
|