4 231
modifications
Ligne 636 : | Ligne 636 : | ||
apt-get update | apt-get update | ||
apt-get install aptitude nano | apt-get install aptitude nano | ||
</pre> | |||
créez /etc/init/openvz.conf | |||
<pre> | |||
# OpenVZ init | |||
description "OpenVZ" | |||
start on startup | |||
task | |||
pre-start script | |||
mount -t devpts devpts /dev/pts | |||
end script | |||
script | |||
start networking | |||
initctl emit filesystem --no-wait | |||
initctl emit local-filesystems --no-wait | |||
initctl emit virtual-filesystems --no-wait | |||
init 2 | |||
end script | |||
</pre> | </pre> | ||
Ligne 707 : | Ligne 729 : | ||
Installez ssh : | Installez ssh : | ||
aptitude install openssh-server | <pre> | ||
aptitude install openssh-server locate | |||
</pre> | |||
Générez automatiquement une nouvelle clé ssh au premier boot (sécurité) : | Générez automatiquement une nouvelle clé ssh au premier boot (sécurité) : | ||
Ligne 713 : | Ligne 737 : | ||
<pre> | <pre> | ||
rm -f /etc/ssh/ssh_host_* | rm -f /etc/ssh/ssh_host_* | ||
cat << EOF > /etc/ | cat << EOF > /etc/rc2.d/S15ssh_gen_host_keys | ||
#!/bin/sh | #!/bin/sh | ||
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -t rsa -N '' | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -t rsa -N '' | ||
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -t dsa -N '' | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -t dsa -N '' | ||
rm -f \$0 | rm -f \$0 | ||
EOF | EOF | ||
chmod a+x /etc/rc2.d/S15ssh_gen_host_keys | |||
</pre> | |||
Nettoyez votre liste de paquets : | Nettoyez votre liste de paquets : | ||
<pre>aptitude clean</pre> | <pre>aptitude clean</pre> |