Article 6N9X0 How Fix SSH Issue?

How Fix SSH Issue?

by
Mo_
from LinuxQuestions.org on (#6N9X0)
Hi Community,
I am having a weird issue with one of my VMs. Long story short, I have a template that I use to clone a new VM. Usually, my template VM is shut down most of the time. Last time, I cloned it to create a new VM. For some foreseen circumstances, I wasn't able to configure the newly created VM, and then I forgot about it. Yesterday, I wanted to update my template and install the Nagios agent and Postfix packages. I was having trouble sending the template, and it keeps getting the "Identification Has changed" message. I removed everything from known_hosts file and /var/lib/sss/pubconf/know_hosts file. It still didn't work, so I went from my hypervisor to access the VM and replaced the IP from 101 to 110. Then, I updated zone files from my DNS server. Finally, I realized I had a cloned VM of my template with the same hostname and IP, so I deleted the newly created VM, but the issue is I can't SSH to the template using host and host/domain name. I emptied the known host's file. I can ping the template using the hostname. I shut down the VM to see if I have multiple VMs with the same IP or hostname, and I got no route to the host message. How can I fix this issue?

Code:[mha@rhel-server-01 ~]$ nslookup 192.168.1.110
110.1.168.192.in-addr.arpa name = template2.homelab.local.

[mha@rhel-server-01 ~]$ nslookup template2.homelab.local
Server: 192.168.1.202
Address: 192.168.1.202#53

Name: template2.homelab.local
Address: 192.168.1.110

[mha@rhel-server-01 ~]$ ssh template2.homelab.local
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ED12345 key sent by the remote host is
SHA256:jaaabbbssssss12345678910ssskkklllfff.
Please contact your system administrator.
Add correct host key in /home/mha/.ssh/known_hosts to get rid of this message.
Offending RSA key in /var/lib/sss/pubconf/known_hosts:3
Host key for template2.homelab.local has changed and you have requested strict checking.
Host key verification failed.
[mha@rhel-server-01 ~]$ ping template2.homelab.local
PING template2.homelab.local (192.168.1.110) 56(84) bytes of data.
64 bytes from template2.homelab.local (192.168.1.110): icmp_seq=1 ttl=64 time=0.723 ms
64 bytes from template2.homelab.local (192.168.1.110): icmp_seq=2 ttl=64 time=0.606 ms
[mha@rhel-server-01 ~]$ cat .ssh/known_hosts
[mha@rhel-server-01 ~]$ cat .ssh/known_hosts.old
[mha@rhel-server-01 ~]$When I shut down the VM
Code:[mha@rhel-server-01 ~]$ ssh template2.homelab.local
sss_ssh_knownhostsproxy: connect to host template2.homelab.local port 22: No route to host
kex_exchange_identification: Connection closed by remote host
Connection closed by UNKNOWN port 65535
Appreciate your help!
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments