SSH default keys and management

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:

Note

Make sure you use a keyboard and console for the following steps. Do not attempt to perform the following steps over an existing SSH session.

  1. Move the default SSH keys by typing the following into the terminal or command line:
    cd /etc/ssh/
    mkdir default_kali_keys
    mv ssh_host_* ...

Get Penetration Testing with Raspberry Pi now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.