Free MP3 Music Header Free MP3 Music Header Free MP3 Music Header
Chrome Strip
Chrome Strip


The SSH service is TCP based and listens by default on port 22.

To start the SSH service on Kali we can type:
#service SSH start

We can verify that the service is running and listening on TCP port 22 by using the netstat command and piping the output of this command to search for the string 'sshd'
#netstat -antp |grep sshd

From this output we can see that the TCP port is in the listening state and is being used by the SSH Daemon - sshd.

To stop the SSH Service.
#service SSH stop

Check again with the same command as earlier to check if the service has stopped.
#netstat -antp |grep sshd

Here, no output suggests that the service is not running. We have successfully stopped the service.

The service command we have used in the earlier lectures is a wrapper around existing system init scripts located in the /etc/init.d directory.

Another commonly used syntax to manage services is directly through there init scripts. For example to directly start and stop the SSH service, I could also issue the following commands:

Start SSH Service:
#/etc/init.d/ssh start

Stop the SSH Service
#/etc/init.d/ssh stop

This is also the same for other services such as apache.

To restart the apache service:
#/etc/init.d/apache2 restart

In certain situation we will actually want certain services to persist over a reboot. A good example would be a remote installation of Kali that we want to access over SSH.

In order to enable the SSH service to run at Boot Time:
#update-rc.d ssh enable

In order to enable the HTTP service to run at Boot Time:
#update-rc.d apache2 enable

Most services can be interacted with in a similar way.

To get more granular controls for services, you can manage Kali Services with the rcconf and sysv-rc-conf commands.

Launch a Menu showing to simply the management of these services with rcconf: