19 lines
1,014 B
Text
19 lines
1,014 B
Text
#!/sbin/openrc-run
|
|
# B17: dropbear SSH for standalone use (installed as /etc/init.d/aurora-ssh). Root login by key (/root/.ssh/authorized_keys) or password.
|
|
# Reachable from Wi-Fi (nft lan_in: tcp 22 to 192.168.77.1 only) and USB mgmt; LTE/wg0 inbound is dropped by aurora_router/aurora_vpn.
|
|
# Not Alpine's /etc/init.d/dropbear: that one needs "net" (-> networking without /etc/network/interfaces fails, and pulls a 2nd udevd).
|
|
description="Dropbear SSH (Wi-Fi/USB management)"
|
|
supervisor=supervise-daemon
|
|
command=/usr/sbin/dropbear
|
|
command_args="-F -E -p 22"
|
|
output_log=/run/aurora-ssh.log
|
|
error_log=/run/aurora-ssh.log
|
|
respawn_delay=5
|
|
respawn_max=0
|
|
depend() { need localmount; after aurora-router; }
|
|
start_pre() {
|
|
mkdir -p /etc/dropbear
|
|
[ -f /etc/dropbear/dropbear_ed25519_host_key ] || dropbearkey -t ed25519 -f /etc/dropbear/dropbear_ed25519_host_key >/dev/null 2>&1
|
|
[ -f /etc/dropbear/dropbear_rsa_host_key ] || dropbearkey -t rsa -s 3072 -f /etc/dropbear/dropbear_rsa_host_key >/dev/null 2>&1
|
|
return 0
|
|
}
|