ssh시(또는 scp)
no kex alg
또는
no hostkey alg
ssh 에러 내용
옛날 2008년 산 ssh client로 요즘 2022년 ssh server에 접속하는 도중 위와 같은 에러를 만났습니다.
ssh 클라이언트 버전 : OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
ssh 서버 버전 : OpenSSH_8.9p1 Ubuntu-3ubuntu0.1, OpenSSL 3.0.2 15 Mar 2022
ssh 에러 원인
버전 차이로 인한 서로 다른 kex 및 hostkey 알고리즘으로 인하여 인증이 불가하기 때문입니다.
kex : key exchange
ssh 해결 방법
가장 좋은 방법은 오래된 ssh 클라이언트를 update하는 것이지만, 불가능한 경우 방법이 있습니다.
다음과 같이 ssh server의 설정파일을 수정하면 됩니다.
설정 파일 위치는 /etc/ssh/sshd_config 입니다.
1. 텍스트 편집기로 설정파일을 엽니다.
sudo vi /etc/ssh/sshd_config
2. 다음 두줄을 가장 마지막 줄에 추가합니다.
KexAlgorithms diffie-hellman-group1-sha1
HostKeyAlgorithms +ssh-rsa,ssh-dss
3. 새로운 설정을 적용하기 위해 ssh를 재시작합니다.
sudo systemctl restart sshd
참고 자료
Vagrant ssh prompts 'no kex alg' and I'm unable to connect to the virtual machine
I'm trying to connect to a vagrant with a command vagrant ssh as instructed in the official vagrant documentation. Earlier I used older ubuntu as a virtual machine: config.vm.box = "hashicorp/preci...
stackoverflow.com
ssh refusing connection with message "no hostkey alg"
My SSH connections worked well, but from last week SSH from my laptop to my board refusing connection. I can make a SSH connection from the board to laptop, but not vice-versa. I tried that with my...
askubuntu.com
'개발 > 에러해결' 카테고리의 다른 글
Rebuild 99% 무한 대기 Dell EMC PowerEdge r740 서버 (2) | 2023.07.07 |
---|---|
구글 플레이 콘솔 앱 삭제, 자세한 설명: 자세한 앱 설명에 사용할 권한이 없는 단어 또는 구문이 포함된 것으로 보입니다. (4) | 2023.05.31 |
인터파크투어 국적 : 국적선택 안됨 (탑승자 정보 입력) (0) | 2023.05.31 |
req.body 가 비었을 때(empty) (0) | 2023.05.26 |
MongoDB Compass Secondary node가 비었을 때 (0) | 2023.05.19 |
댓글