Rotating SSH host keys and clearing known host entries

Rotating SSH Keys

Run as root:
  • rm -f /etc/ssh/ssh_host_*_key*; dpkg-reconfigure openssh-server || service sshd restart
Clearing Known Hosts Entries

OpenSSH

To remove a known hosts entry for an OpenSSH client:
  • ssh-keygen -R [hostname]
  • ssh-keygen -R [IP address]
PuTTY

To remove a known hosts entry for PuTTY (Windows):
  • Search for and run regedit.exe
  • Navigate to HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys
  • Delete the key
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How do I connect to my VPS? (SSH)

We recommend the program PuTTY for SSH. You can download it here:...

How do I connect to my VPS? (SSH)

We recommend the program PuTTY for SSH. You can download it here:...

How do I reset/reinstall my VPS OS?

Steps for Reinstalling MAKE SURE YOU DOWNLOAD WHATEVER YOU WANT TO SAVE TO YOUR COMPUTER....

KVM Information / Installation Guide

KVM clients have two ways to install their server OS. Log into the SolusVM control panel and...

How do I upgrade or downgrade my service?

If you would like to upgrade or downgrade your service, we have a convenient process to do just...