diffie-hellman-group1-sha1
키 교환 방법을 요청하는 서버로 ssh 할 수 없습니다.
ssh 123.123.123.123
Unable to negotiate with 123.123.123.123 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1
데비안 8.0에서 diffie-hellman-group1-sha1
키 교환 방법을 활성화하는 방법은 무엇입니까?
나는 (제안 here ) 시도했다
내 /etc/ssh/ssh_config
에 다음 줄을 추가하십시오.
KexAlgorithms diffie-hellman-group1-sha1,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1
Ciphers 3des-cbc,blowfish-cbc,aes128-cbc,aes128-ctr,aes256-ctr
키를 재생성
ssh-keygen -A
와 함께 ssh를 다시 시작
service ssh restart
그러나 여전히 오류가 발생합니다.
OpenSSH 웹 사이트에는 이와 같은 legacy issues 전용 페이지가 있습니다. 다음과 같은 접근 방식을 제안합니다. 클라이언트에서 :
ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 123.123.123.123
더 영구적으로
Host 123.123.123.123
KexAlgorithms +diffie-hellman-group1-sha1
~/.ssh/config
.
이렇게하면 기존 알고리즘 클라이언트에서가 활성화되어 서버에 연결할 수 있습니다.
이 솔루션을 시도했지만 내 문제는 최근에 업그레이드 한 서버 (우분투 14-> 우분투 16)에 많은 (레거시) 클라이언트가 연결되어 있다는 것입니다.
Openssh6-> openssh7에서의 변경은 기본적으로 diffie-hellman-group1-sha1
키 교환 방법으로 비활성화되어 있습니다.
this 및 this 을 읽은 후 /etc/ssh/sshd_config
파일에 필요한 변경 사항을 생각해 냈습니다.
#Legacy changes
KexAlgorithms +diffie-hellman-group1-sha1
Ciphers +aes128-cbc
그러나 더 광범위한 기존 변경 사항이 있습니다 ( here 에서 가져옴)
#Legacy changes
KexAlgorithms diffie-hellman-group1-sha1,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1
Ciphers 3des-cbc,blowfish-cbc,aes128-cbc,aes128-ctr,aes256-ctr