Cannot access to the terminal after lxc migration

Xanatos

Member
Oct 13, 2022
4
0
6
I have a small proxmox cluster, and i have a strange error migrating lxc from a node to another.
The migration goes well, the lxc container starts and it's fully functional, BUT, if i try to access it from proxmox terminal, it gives me this error:

Code:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 RSA key sent by the remote host is
SHA256:#############################
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending RSA key in /etc/ssh/ssh_known_hosts:2
  remove with:
  ssh-keygen -f "/etc/ssh/ssh_known_hosts" -R "192.168.0.2"
Host key for 192.168.0.2 has changed and you have requested strict checking.
Host key verification failed.

I've tried anything with ssh-keygen and ssh-keyscan and to me it seems all ok.
Both the lxc and the node have the correct keys.
I can connect with ssh to the lxc and i don't have any issue. Just this one.
And if i migrate the lxc back to the original node, the problem doesn't show anymore.

EDIT: maybe i'm an idiot, but accessing proxmox interface from the ip of the node where i moved the lxc, the terminal issue is gone.

EDIT2: node2 is the newest node in the cluster. If i connect to his ip to access proxmox webconsole then i can freely access terminal for every lxc in every node.
If i connect to the webconsole from node1, then i can access terminal only for the lxc/vm on node1 and not the ones on node2.

Before creating the cluster, node1 was (obviously) a standalone node. I've changed his name and ip following the guides. Could it be that the issue is correlated to this change? Can i make some corrections to node1 to avoid the issue?

Every help is wall accepted :-D
 
Last edited:
AAAAAAnd i've solved the issue...
It was related to the changing made on the standalone node.

Looking in /etc/pve/priv/known_hosts i've seen that there was the old name and ip of node1 with the new name and ip of node1.
And node2 (that got previous node1 ip address) wasn't present.

So after backing up the file, i've removed the old entry and added the entries from node2.

Issue solved!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!