Check whether port 22 is listening or not
root@kali:~# netstat -an | grep :22
root@kali:~#
Check the status of ssh service
root@kali:~# service ssh status
[FAIL] sshd is not running … failed!
root@kali:~#
Start ssh service
root@kali:~# service ssh start
[ ok ] Starting OpenBSD Secure Shell server: sshd.
root@kali:~#
Verify the ssh status again
root@kali:~# service ssh status
[ ok ] sshd is running.
root@kali:~#
Check whether port 22 is listening or not
root@kali:~# netstat -an | grep :22
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp6 0 0 :::22 :::* LISTEN
root@kali:~#
root@kali:~/Desktop#