tencent cloud

문서Bastion Host

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

다운로드
포커스 모드
폰트 크기
마지막 업데이트 시간: 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.


도움말 및 지원

문제 해결에 도움이 되었나요?

피드백