tencent cloud

文档Bastion Host

Linux Resource Login via Mac Prompting No Matching Host Key Type Found

Download
聚焦模式
字号
最后更新时间: 2025-04-18 11:17:41

Phenomenon Description

When you log in to a Linux server through a Mac system, the prompt "no matching host key type found" appears.


Possible Causes

Starting from OpenSSH 8.8, the default configuration no longer supports ssh-rsa.

Solutions

Modify the sshd file to add the algorithm.

Directions

1. Execute the following command on your local computer:
sudo vim /etc/ssh/ssh_config
2. Append the following lines at the end of the sshd file (ensure proper indentation):
HostKeyAlgorithms +ssh-rsa,ssh-dss
PubkeyAcceptedKeyTypes +ssh-rsa

3. Log in again to the Linux server.


帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈