Enable SSH on Kali

The official Kali Linux VM comes with ssh disabled. I like to have ssh available so I can run commands from Terminal on my host to the VM. I only enable ssh in testing environments. Follow the steps to enable ssh.  

apt-get install ssh
systemctl enable ssh
service ssh start

Now we need to edit the config file to allow root logins. I use vim, if you're new replace vim with nano in the command below to make editing easier.

vim /etc/ssh/sshd_config

Change the following line from

#PermitRootLogin prohibit-password

to

PermitRootLogin yes

Make sure you remove the # or else it won't work.

service ssh restart

After restarting the service, the root user can successfully ssh in.