Configuration and opening of NIC, SSH, Apache in Kali

Source: Internet
Author: User
Tags get ip

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.