Results 1 to 7 of 7

Thread: Change your Kali default ssh keys.

  1. #1
    Join Date
    2013-Apr
    Posts
    32

    Change your Kali default ssh keys.

    So here's is my guide to change the already generated ssh keys that everyone has installed on kali:

    After all we are hot on security right???? We dont want the same keys as the next man do we (MITM).....

    Move the default Kali ssh keys to a new folder:

    cd /etc/ssh/
    mkdir default_kali_keys
    mv ssh_host_* default_kali_keys/


    This will move your default keys to the new folder...

    Regenerate the 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 ...
    insserv: warning: current start runlevel(s) (empty) of script `ssh' overrides LSB defaults (2 3 4 5).
    insserv: warning: current stop runlevel(s) (2 3 4 5) of script `ssh' overrides LSB defaults (empty).

    Verify ssh key hashes are different:

    md5sum ssh_host_*
    Compare new key hashes to the hashes below)
    cd default_kali_keys/
    md5sum *

    b9419ea3a8fff086c258740e89ca86b8 ssh_host_dsa_key
    f9a5b57d7004e3740d07c5b037d15730 ssh_host_dsa_key.pub
    58e49e0d7b24249c38db0c9cf595751b ssh_host_ecdsa_key
    597c83fabf3c1e4f2c7af74af05ac671 ssh_host_ecdsa_key.pub
    cc0d92036bb86797bed354338faa7223 ssh_host_rsa_key
    cc9ddc90b891b5251ed4ea8341495e84 ssh_host_rsa_key.pub

    Job done !!!! I would also change the default port from 22 to another in the ssh_config

    Here is my win 7 phone running ssh connected to Kali and running attaxsuite:

    http://s1302.photobucket.com/user/pe...22fff.jpg.html

    http://s1302.photobucket.com/user/pe...02639.jpg.html

    http://s1302.photobucket.com/user/pe...26aa9.jpg.html

    Kali screens:

    http://s1302.photobucket.com/user/pe...bef0f.jpg.html

    Kind Regards Dee
    Last edited by pentest09; 2013-05-11 at 17:17.

  2. #2
    Join Date
    2013-Sep
    Posts
    14
    Great, Thanks

  3. #3
    Join Date
    2013-Jul
    Posts
    33
    Great advice, thanks!

  4. #4
    Join Date
    2014-Jul
    Location
    USA
    Posts
    1
    Thanks Dee!
    x_X

  5. #5
    Join Date
    2013-May
    Posts
    19
    I'm curious, what is the value in preserving the old/previous host ssh keys?

  6. #6
    Join Date
    2016-Jun
    Posts
    2
    Thanks for this!!

  7. #7
    Join Date
    2015-Aug
    Posts
    21
    Thanks.. Great post!

Similar Threads

  1. Change default keyboard Kali Live USB
    By johannu in forum General Archive
    Replies: 2
    Last Post: 2017-08-10, 23:26
  2. Change the default hotspot settings
    By m1c4h3ll in forum General Archive
    Replies: 1
    Last Post: 2016-02-16, 14:07
  3. [Help] How can I change default terminal?
    By ifytbairz in forum General Archive
    Replies: 0
    Last Post: 2014-04-15, 02:12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •