aptitude install mc openssh-server iperf telnetd
hostname.sh
hostname.sh
#!/bin/bash
#
usage() {
echo "usage : $0 nouveau_nom_hote"
exit 1
}
[ -z $1 ] && usage
ancien=`hostname`
nouveau=$1
for file in \
/etc/exim4/update-exim4.conf.conf \
/etc/printcap \
/etc/hostname \
/etc/hosts \
/etc/ssh/ssh_host_rsa_key.pub \
/etc/ssh/ssh_host_dsa_key.pub \
/etc/motd \
/etc/ssmtp/ssmtp.conf
do
[ -f $file ] && sed -i.old -e "s:$ancien:$nouveau:g" $file
done
# vi /etc/default/grub
Append / modify as follows:
GRUB_CMDLINE_LINUX='console=tty0 console=ttyS0,115200n8' GRUB_TERMINAL=serial GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
# update-grub
/etc/inittab
T0:23:respawn:/sbin/getty -L ttyS0 115200 vt102
init q
# vi /etc/securetty
Make sure UART serial ports /dev/ttyS0 is listed:
ttyS0
UPD (for Debian Jessie):
1. GRUB_CMDLINE_LINUX="console=ttyS0,115200n8"
2. update-grub
3. GNS3: enable remote console
Комментариев нет:
Отправить комментарий