Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ubuntu uses ssh.service (not sshd.service) for the OpenSSH daemon.
# ssh-host-keys.service is enabled via WantedBy=ssh.service (no preset needed).
# Explicitly enable ssh.service for Ubuntu debug images.
enable ssh.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Unit]
Description=Generate SSH host keys for /run/ssh
Documentation=man:sshd(8)
DefaultDependencies=no
Before=ssh.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=mkdir -p /run/ssh
ExecStart=ssh-keygen -q -t rsa -f /run/ssh/ssh_host_rsa_key -N "" -C ""
ExecStart=ssh-keygen -q -t ecdsa -f /run/ssh/ssh_host_ecdsa_key -N "" -C ""
ExecStart=ssh-keygen -q -t ed25519 -f /run/ssh/ssh_host_ed25519_key -N "" -C ""

[Install]
WantedBy=ssh.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[Unit]
Wants=ssh-host-keys.service
After=ssh-host-keys.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Unit]
Description=Generate SSH host keys for /run/ssh
Documentation=man:sshd(8)
DefaultDependencies=no
Before=ssh.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=mkdir -p /run/ssh
ExecStart=ssh-keygen -q -t rsa -f /run/ssh/ssh_host_rsa_key -N "" -C ""
ExecStart=ssh-keygen -q -t ecdsa -f /run/ssh/ssh_host_ecdsa_key -N "" -C ""
ExecStart=ssh-keygen -q -t ed25519 -f /run/ssh/ssh_host_ed25519_key -N "" -C ""

[Install]
WantedBy=ssh.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[Unit]
Wants=ssh-host-keys.service
After=ssh-host-keys.service
Loading