Ask for help:no matching host key type found. Their offer:ssh-rsa[preauth]

General support questions
Post Reply
506883303@qq.com
Posts: 1
Joined: 2023/04/11 15:47:55

Ask for help:no matching host key type found. Their offer:ssh-rsa[preauth]

Post by 506883303@qq.com » 2023/04/11 16:14:57

Hello:
I have two Linux VMS. One of them runs on CentOS7, and the OpenSSH version of this CentOS7 VM is Open_SSH_9.1p1. When I use another Linux VM to connect to this CentOS7 VM, the connection fails. The error message displayed in CentOS7 logs is no matching host key type found. Their offer:ssh-rsa[preauth]. How can I solve the problem?

User avatar
TrevorH
Site Admin
Posts: 33221
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Ask for help:no matching host key type found. Their offer:ssh-rsa[preauth]

Post by TrevorH » 2023/04/11 16:45:40

I have two Linux VMS. One of them runs on CentOS7, and the OpenSSH version of this CentOS7 VM is Open_SSH_9.1p1. When I use another Linux VM to connect to this CentOS7 VM, the connection fails. The error message displayed in CentOS7 logs is no matching host key type found. Their offer:ssh-rsa[preauth]. How can I solve the problem?
If you have openssh 9.1p1 on there then it's not a CentOS copy. CentOS 7 ships openssh-7.4p1-22.el7_9.x86_64 and that is what is supported.

Newer openssh versions have deprecated various ciphers etc so thing that worked on older versions of openssh may no longer do so. In fact the release notes for openssh 9.1 say
-----------

* ssh(1), sshd(8): add a RequiredRSASize directive to set a minimum
RSA key length. Keys below this length will be ignored for user
authentication and for host authentication in sshd(8).

ssh(1) will terminate a connection if the server offers an RSA key
that falls below this limit, as the SSH protocol does not include
the ability to retry a failed key exchange.
I would guess that is what you are seeing.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply