How to establish ssh key pair when “Host key verification failed”

后端 未结 11 1827
抹茶落季
抹茶落季 2021-01-30 10:17

I have set up ssh key pairs between my desktop and two servers, and from the servers to my desktop, but after reinstalling the OS on my desktop, I can\'t re-establish the key-pa

11条回答
  •  余生分开走
    2021-01-30 10:56

    First you should remove existing key. SSH keys in most of Linux-based OS will be saved this file "/root/.ssh/known_hosts", so in order to remove the key related to host the following command will be used:

    ssh-keygen -f "/root/.ssh/known_hosts" -R [Hostname]

    Regards K1

提交回复
热议问题