#!/bin/bash # Change network interface IP address ip addr flush dev enp0s8 ip addr add dev enp0s8 ip link set dev enp0s8 up # Update resolv.conf with DNS servers echo "nameserver" > /etc/resolv.conf echo "nameserver" >> /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 ( and google.com for confirmation ping -c 5 ping -c 5 google.com echo "IP address, DNS servers, sources.list, SSH configured, and ping tests completed!"