Uly.me

cloud engineer

  • Home
  • About
  • Archives
Home/Archives for ssh-keygen

August 31, 2019

Remove Key from known_hosts

If you’ve changed keys, you will need to delete a ssh key from /etc/known_hosts file.

You can edit it manually using an editor such as vi or vim.

vim ~/.ssh/known_hosts

vim ~/.ssh/known_hosts

Or you can use ssh-keygen command with -R option to delete the hostname or IP address.

ssh-keygen -f "~/.ssh/known_hosts" -R "xxx.xxx.xxx.xxx"

ssh-keygen -f "~/.ssh/known_hosts" -R "xxx.xxx.xxx.xxx"

  • Cloud
  • Linux
  • Git

Copyright © 2012–2021