« Proxmox et OpenVZ » : différence entre les versions

Aller à la navigation Aller à la recherche
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/init.d/ssh_gen_host_keys
cat << EOF > /etc/rc2.d/S15ssh_gen_host_keys
#!/bin/sh
#!/bin/sh
### BEGIN INIT INFO
# Provides:          Generates new ssh host keys on first boot
# Required-Start:    $remote_fs $syslog
# Required-Stop:    $remote_fs $syslog
# Default-Start:    2 3 4 5
# Default-Stop:
# Short-Description: Generates new ssh host keys on first boot
# Description:      Generates new ssh host keys on first boot
### END INIT INFO
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 ''
insserv -r /etc/init.d/ssh_gen_host_keys
rm -f \$0
rm -f \$0
EOF
EOF
chmod a+x /etc/rc2.d/S15ssh_gen_host_keys
</pre>


chmod a+x /etc/init.d/ssh_gen_host_keys
insserv /etc/init.d/ssh_gen_host_keys
</pre>
Nettoyez votre liste de paquets :
Nettoyez votre liste de paquets :
<pre>aptitude clean</pre>
<pre>aptitude clean</pre>
4 231

modifications

Menu de navigation