mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-26 18:53:01 +02:00
sshd: Move hostkeys to /var/lib/ssh
This means keys are persistent even when /etc is not.
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
task [S] /lib/infix/ssh-hostkeys --
|
||||
service [2345789] <usr/ssh-hostkeys> /usr/sbin/sshd -D -- OpenSSH daemon
|
||||
@@ -0,0 +1 @@
|
||||
../available/sshd.conf
|
||||
@@ -0,0 +1 @@
|
||||
Include /etc/ssh/sshd_config.d/*.conf
|
||||
@@ -0,0 +1,3 @@
|
||||
HostKey /var/lib/ssh/ssh_host_rsa_key
|
||||
HostKey /var/lib/ssh/ssh_host_ecdsa_key
|
||||
HostKey /var/lib/ssh/ssh_host_ed25519_key
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
for type in ecdsa ed25519 rsa; do
|
||||
[ -f /var/lib/ssh/ssh_host_${type}_key ] \
|
||||
|| ssh-keygen -N "" -t $type -f /var/lib/ssh/ssh_host_${type}_key \
|
||||
|| exit 1
|
||||
done
|
||||
|
||||
initctl cond set ssh-hostkeys
|
||||
Reference in New Issue
Block a user