官术网_书友最值得收藏!

Starting network services

Kali Linux comes with several network services which may be useful in various situations and are disabled by default. In this recipe, we will cover the steps to set up and start each service using various methods.

Getting ready

The following requirement is needed in order to continue:

  • A connection to the network with a valid IP address

How to do it...

Let's begin the process of starting our default service:

  1. Start the Apache server:
    service apache2 start
    

    We can verify the server is running by browsing to the localhost address.

  2. To start the Secure Shell (SSH) service, SSH keys need to be generated for the first time:
    sshd-generate
    
  3. Start the Secure Shell server:
    service ssh start
    
  4. To verify the server is up and listening, use the netstat command:
    netstat -tpan | grep 22
    
  5. Start the FTP server:
    service pure-ftpd start
    
  6. To verify the FTP server, use the following command:
    netstat -ant | grep 21
    
    Note

    You can also use the ps-ef | grep 21 command.

  7. To stop a service, just issue the following command:
    service <servicename> stop
    

    Where <servicename> stands for the network service we want to stop. For example:

    service apache2 stop
    
  8. To enable a service at boot time, use the following command:
    update-rc.d –f <servicename> defaults
    

    Where <servicename> stands for the network service we want at boot time. For example:

    update-rc.d –f ssh defaults
    
    Note

    You can also do this from the Services menu in Kali Linux. From the Start menu, go to Kali Linux | Services.

主站蜘蛛池模板: 抚顺市| 淮北市| 宝应县| 和政县| 靖远县| 城口县| 沛县| 罗城| 伊宁市| 苏尼特右旗| 科技| 固镇县| 台州市| 大安市| 鸡东县| 乐平市| 揭东县| 定边县| 德格县| 湛江市| 祁连县| 伊金霍洛旗| 乌兰浩特市| 朝阳市| 漳平市| 平凉市| 敦化市| 邵阳市| 九江市| 荔浦县| 贡嘎县| 岐山县| 都兰县| 双流县| 民勤县| 县级市| 罗江县| 南城县| 宿州市| 庆安县| 微博|