How to modify the Nic file in Kali-linux to start the SSH and Apache service
1. Su root//Get root permission
2. shift+ letters//uppercase and lowercase letters switching
3. Modify the NIC configuration
use DHCP to surf the internet
In the desktop right---in the terminal, enter the command "vim/etc/network/interfaces", keyboard input I enter the Insert edit mode, press ESC + ": Wq" Save exit--in Terminal input command " Reboot "Restart your computer to get IP automatically
use static address mode to surf the internet
On the desktop right----open in terminal--input command "vim/etc/network/interfaces", keyboard input I enter Insert edit mode
Iface eth0 inet static//configuration eth0 Use default quiescent address
Address 172.30.1.160//set eth0 IP addresses
netmask 255.255.255.0//Configure subnet mask for eth0
A static IP address is also required to manually set the DNS configuration file
After editing, press ESC + ": Wq" Save exit--Input command "vi/etc/resolv.conf", keyboard input I enter Insert edit mode, set up and save reboot system.
4. Open SSH Service
In terminal input "vim/etc/ssh/sshd_config", keyboard input I enter Insert edit mode
Remove the #passwordauthentication # from the comment before Yes,
Remove the #permitrootlogin Prohibit-password before the comment #,
Change Prohibit-password to Yes
After editing, press ESC + ": Wq" Save exit, enter "/etc/init.d/ssh start" to start the SSH service
5. Open Apache Service
In the terminal input "vim/etc/apache2/ports.conf", keyboard input I enter the Insert edit mode, and modify the APACHE2 default listener port number for 8080-> edit, press ESC + ": Wq" Save exit-- Enter "/etc/init.d/apache2 start" in terminal
Enter "http://localhost:8080" in the browser address bar
----------------------------------------------------------------Split Line------------------------------------------------------ ---
PS: Meng New one, this article purely for study notes, in case a day silly forget--。 If there is something wrong, look at the big boys enlighten ~
Configuration and opening of NIC, SSH, Apache in Kali