#!/bin/bash # Change network interface IP address ip addr flush dev enp0s8 ip addr add 192.168.56.11/24 dev enp0s8 ip link set dev enp0s8 up # Update resolv.conf with DNS servers echo "nameserver 8.8.8.8" > /etc/resolv.conf echo "nameserver 8.8.4.4" >> /etc/resolv.conf # Update sources.list echo "# halo:) deb http://deb.debian.org/debian bullseye main deb-src http://deb.debian.org/debian bullseye main deb http://deb.debian.org/debian-security/ bullseye-security main deb-src http://deb.debian.org/debian-security/ bullseye-security main deb http://deb.debian.org/debian bullseye-updates main deb-src http://deb.debian.org/debian bullseye-updates main" > /etc/apt/sources.list # Update enp0s3 interface configuration sed -i 's/\r$//' /etc/network/interfaces # Restart networking service systemctl restart networking # Install SSH apt install openssh-server -y # Modify SSH configuration to allow root login sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config # Restart SSH service systemctl restart ssh # Ping the host (192.168.56.1) and google.com for confirmation ping -c 5 192.168.56.1 ping -c 5 google.com echo "IP address, DNS servers, sources.list, SSH configured, and ping tests completed!"