로그인
Sign in

Unable to negotiate with 192.168.1.1 port 22: no matching host key type found. Their offer: ssh-dss

Unable to negotiate with 192.168.1.2 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1


 

 

  • 해결책 1

시스템 전체에 적용되는 해결책이다.

Vi와 같은 텍스트 에디터를 이용해 /etc/ssh 디렉토리에 있는 ssh_config 파일을 연다.

sudo vi /etc/ssh/ssh_config

아래와 같이 라인을 찾아 맨 앞에 있는 # (Hash/Pound)을 제거한다.

# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc


그리고 맨 아래에 아래와 같은 라인을 추가한다.

HostkeyAlgorithms ssh-dss,ssh-rsa
KexAlgorithms +diffie-hellman-group1-sha1


전체적으로 아래와 같이 될 것이다.
 

# Port 22
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
MACs hmac-md5,hmac-sha1,umac-64@openssh.com

# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
# VisualHostKey no
# ProxyCommand ssh -q -W %h:%p gateway.example.com
# RekeyLimit 1G 1h

Host *
SendEnv LANG LC_*
HostkeyAlgorithms ssh-dss,ssh-rsa
KexAlgorithms +diffie-hellman-group1-sha1


저장하고 나가면 바로 적용이 된다. 리부팅이 필요없다.
 
 
/etc/ssh/sshd_config
하단에  아래 항목도 적어줘야 할 수 있음
HostkeyAlgorithms ssh-dss,ssh-rsa
KexAlgorithms +diffie-hellman-group1-sha1
List of Articles
번호 제목 글쓴이 날짜 조회 수
공지 자주 사용하는 명령어 제비게릴라 2019-06-27 179
252 Centos 7에서 Docker, Docker Compose 설치 방법 제비게릴라 2025-02-25 6
251 Rocky Linux 9에서 bonding 설정 작업 제비게릴라 2025-02-22 8
250 python 3.10 설치 방법 제비게릴라 2025-02-19 4
249 megaRaid 명령어 제비게릴라 2024-04-17 107
248 azcopy github에서 소스 받아 설치하기.. 제비게릴라 2024-01-23 13
» ssh 접속 알고리즘 문제로 로그인 오류 제비게릴라 2024-01-10 169
246 centos7 firewalld 설정 방법 제비게릴라 2023-12-01 32
245 dmidecode 값 제비게릴라 2023-08-25 16
244 sftp umask 설정 방법 제비게릴라 2023-08-16 86
243 L4 설정 후 ftp 접속후 ls명령어 안되는 경우 제비게릴라 2023-07-12 64
242 Ubuntu 패키지 업데이트 에러: dpkg: error processing package update-notifier-common (–configure): 제비게릴라 2023-01-19 134
241 centos 6에서 gcc 5버전, cmake 설치 제비게릴라 2022-12-08 93
240 리눅스 백업 후 원복 제비게릴라 2022-10-17 14
239 php pdo-mysql 확장모듈 설치 제비게릴라 2022-01-10 85
238 apache 소스파일을 rpm으로 컴파일 방법 제비게릴라 2022-01-10 103
237 ACPI Error 해결방법 [1] 제비게릴라 2021-12-18 93
236 net_ratelimit ping: sendmsg: Invalid argument 또는 kernel: Neighbour table overflow 발생시.. 제비게릴라 2021-08-25 181
235 tar 디렉토리 구조만 묶는 방법 제비게릴라 2021-04-23 156
234 openssl source 설치 제비게릴라 2021-03-10 269
233 vnc 설정 방법 제비게릴라 2020-10-20 25