At this point, you have a Raspberry Pi ready for remote management using SSH. This is good; however, the keys that are installed by default are extremely predictable with every other default installation for OpenSSH. Although this is optional, best practice is changing the default keys. After all, it would be embarrassing if your penetration testing machine got hacked.
Here are the steps to create a new SSH key for your Kali Linux system:
cd /etc/ssh/ mkdir default_kali_keys mv ssh_host_* default_kali_keys/
dpkg-reconfigure openssh-server Creating SSH2 RSA key; this may take some time ... Creating SSH2 DSA key; this may take some time ... Creating SSH2 ECDSA key; this may take some time ... [ ok ] Restarting OpenBSD Secure Shell server: sshd.
The following screenshot shows the launch of the preceding commands:
The final step is restarting the SSH services on your Kali Linux system using the service ssh restart
command.