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

  • Kali Linux Cookbook
  • Willie L. Pritchett David De Smet
  • 251字
  • 2021-07-23 16:08:05

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.

主站蜘蛛池模板: 华阴市| 萨嘎县| 隆尧县| 贺兰县| 沈丘县| 论坛| 凤山县| 新闻| 东港市| 湘阴县| 柳州市| 临西县| 奇台县| 安国市| 汉川市| 扎囊县| 中西区| 温泉县| 剑阁县| 临邑县| 偃师市| 晋江市| 马鞍山市| 定远县| 乐陵市| 怀远县| 晋州市| 元朗区| 新乡市| 桓台县| 黑龙江省| 哈巴河县| 枝江市| 通化县| 萨嘎县| 武川县| 安化县| 库车县| 广宁县| 泽普县| 新安县|