[SOLVED] console: Failed to connect to server: Host Key verification failed

hellfire

Well-Known Member
Aug 17, 2016
61
32
58
46
When I request the console I get the following error in the console window:

Code:
failed to connect to server

In the log line I get:

Code:
Host Key verification failed
TASK ERROR: Failed to run vncproxy.


I have this error now and then(after reinstalling,...) and will describe the solution:

The problem is, that the host where I started the WebGUI(server-a) has an incorrect ssh-host-key for the host the vm is on(server-b) and can not open a console(or migrate). To fix this the following is necessary:

  • Open a root console at server-a
  • run the command:
    Code:
    /usr/bin/ssh -e none -o 'HostKeyAlias=server-b-name' root@server-b-ip-address /bin/true
    server-b-name is the name of the node server-b in the cluster
    server-b-ip-address is the primary cluster-ip-address of server-b

    Example:

    My server is named px03 and its primary ip address is 192.168.207.12

    Code:
    /usr/bin/ssh -e none -o 'HostKeyAlias=px03' root@192.168.207.12 /bin/true

  • If there are any errors fix them according to the ssh output. Host Key Verification failed means there's a wrong key in /root/.ssh/known_hosts. The wrong key should be removed and the new key should be accepted when prompted for at the ssh command.

  • If the command succeeds with no output all should be perfect agin
 
I encountered this issue, and your solution worked for me. Thank you!

I was curious how /etc/ssh/ssh_known_hosts had the alias for the other node without the IP - the 'HostKeyAlias' ssh option clarified this.
 
  • Like
Reactions: Jannoke
Maravilha, estava com o Seguinte Erro ao Conectar não VNCPROXY:


A verificação da chave do host falhou.
ERRO DE TAREFA: falha ao executar vncproxy.

Mesmo refazendo as chaves dos hosts (nem sei se isso pode afetar o Cluster) nada funcionava, com essa dica, tudo ficou 100% !!!!!

Parabens!!!!!!!!!!!!!!!!!!!!!!
 
Maravilha, estava com o Seguinte Erro ao Conectar não VNCPROXY:


A verificação da chave do host falhou.
ERRO DE TAREFA: falha ao executar vncproxy.

Mesmo refazendo as chaves dos hosts (nem sei se isso pode afetar o Cluster) nada funcionava, com essa dica, tudo ficou 100% !!!!!

Parabens!!!!!!!!!!!!!!!!!!!!!!
Great that you could solve your issue, but please remember that this is an international English-speaking forum to provide answers for a broad audience. We do not have a Portuguese sub-forum, I'm afraid, so I'd be great if you could post in English - thanks!
 
When I request the console I get the following error in the console window:

Code:
failed to connect to server

In the log line I get:

Code:
Host Key verification failed
TASK ERROR: Failed to run vncproxy.


I have this error now and then(after reinstalling,...) and will describe the solution:

The problem is, that the host where I started the WebGUI(server-a) has an incorrect ssh-host-key for the host the vm is on(server-b) and can not open a console(or migrate). To fix this the following is necessary:

  • Open a root console at server-a
  • run the command:
    Code:
    /usr/bin/ssh -e none -o 'HostKeyAlias=server-b-name' root@server-b-ip-address /bin/true
    server-b-name is the name of the node server-b in the cluster
    server-b-ip-address is the primary cluster-ip-address of server-b

    Example:

    My server is named px03 and its primary ip address is 192.168.207.12

    Code:
    /usr/bin/ssh -e none -o 'HostKeyAlias=px03' root@192.168.207.12 /bin/true

  • If there are any errors fix them according to the ssh output. Host Key Verification failed means there's a wrong key in /root/.ssh/known_hosts. The wrong key should be removed and the new key should be accepted when prompted for at the ssh command.

  • If the command succeeds with no output all should be perfect agin
made my day. big thx.
 
When I request the console I get the following error in the console window:

Code:
failed to connect to server

In the log line I get:

Code:
Host Key verification failed
TASK ERROR: Failed to run vncproxy.


I have this error now and then(after reinstalling,...) and will describe the solution:

The problem is, that the host where I started the WebGUI(server-a) has an incorrect ssh-host-key for the host the vm is on(server-b) and can not open a console(or migrate). To fix this the following is necessary:

  • Open a root console at server-a
  • run the command:
    Code:
    /usr/bin/ssh -e none -o 'HostKeyAlias=server-b-name' root@server-b-ip-address /bin/true
    server-b-name is the name of the node server-b in the cluster
    server-b-ip-address is the primary cluster-ip-address of server-b

    Example:

    My server is named px03 and its primary ip address is 192.168.207.12

    Code:
    /usr/bin/ssh -e none -o 'HostKeyAlias=px03' root@192.168.207.12 /bin/true

  • If there are any errors fix them according to the ssh output. Host Key Verification failed means there's a wrong key in /root/.ssh/known_hosts. The wrong key should be removed and the new key should be accepted when prompted for at the ssh command.

  • If the command succeeds with no output all should be perfect agin
thank you this solved my issue
 

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!