Reset SSH keys Debian

Remove authorized keys

rm -f /root/.ssh/authorized_keys

Generate new RSA key

ssh-keygen -t rsa -b 4096

Remove existing host keys

rm -rfv /etc/ssh/*key*

Automatically regenerate host keys

/usr/bin/ssh-keygen -A
Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp