2006-11-23 18:43:28 +01:00
|
|
|
{openssh}:
|
|
|
|
|
|
|
|
{
|
|
|
|
name = "sshd";
|
|
|
|
|
|
|
|
job = "
|
|
|
|
description \"SSH server\"
|
|
|
|
|
|
|
|
start on network-interfaces/started
|
|
|
|
stop on network-interfaces/stop
|
|
|
|
|
|
|
|
start script
|
2006-11-30 00:10:22 +01:00
|
|
|
source ${../helpers/accounts.sh}
|
|
|
|
|
2006-11-23 18:43:28 +01:00
|
|
|
mkdir -m 0555 -p /var/empty
|
|
|
|
|
|
|
|
mkdir -m 0755 -p /etc/ssh
|
|
|
|
|
|
|
|
if ! test -f /etc/ssh/ssh_host_dsa_key; then
|
|
|
|
${openssh}/bin/ssh-keygen -t dsa -b 1024 -f /etc/ssh/ssh_host_dsa_key -N ''
|
|
|
|
fi
|
|
|
|
|
2006-11-30 00:10:22 +01:00
|
|
|
if ! userExists sshd; then
|
|
|
|
createUser sshd x 74 74 'SSH privilege separation user' /var/empty /noshell
|
2006-11-23 18:43:28 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
end script
|
|
|
|
|
2006-11-24 16:56:11 +01:00
|
|
|
respawn ${openssh}/sbin/sshd -D -h /etc/ssh/ssh_host_dsa_key -f /etc/ssh/sshd_config
|
2006-11-23 18:43:28 +01:00
|
|
|
";
|
|
|
|
|
|
|
|
}
|