Ajout : iodined tunnel IP sur DNS.
[lhc/ateliers.git] / etc / sv / sshd / local.sh
1 "$tool"/local/apt-get-install openssh-server
2 "$tool"/local/insserv-remove ssh
3 ssh-keygen -F "$local_fqdn" -f "$tool"/etc/ssh/known_hosts |
4 ( while IFS= read -r line
5 do case $line in (*" RSA") return 0; break;; esac
6 done; return 1 ) ||
7 sudo ssh-keygen -t rsa -b 4096 -N '' -f /etc/ssh/ssh_host_rsa_key
8 sudo rm -f \
9 /etc/ssh/ssh_host_dsa_key \
10 /etc/ssh/ssh_host_dsa_key.pub \
11 /etc/ssh/ssh_host_ecdsa_key \
12 /etc/ssh/ssh_host_ecdsa_key.pub
13 # NOTE: clefs générées par Debian
14 m4 \
15 --define=LOCAL_IPV4=$local_ipv4 \
16 <"$tool"/etc/ssh/sshd_config.m4 |
17 sudo install -m 640 -o root -g root /dev/stdin \
18 /etc/ssh/sshd_config
19 sudo install -m 644 -o root -g root \
20 "$tool"/etc/ssh/ssh_config \
21 /etc/ssh/ssh_config