Book Image

Penetration Testing with Raspberry PI

Book Image

Penetration Testing with Raspberry PI

Overview of this book

Table of Contents (14 chapters)
Penetration Testing with Raspberry Pi
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Disclaimer
Preface
Index

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_* default_kali_keys/
    
  2. Generate a new key by using the following command and watching the prompts:

    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...