hoony's web study

728x90
반응형

AWS 에 접속을 할때는 항상 key 와 관련된 파일을 가지고 ssh를 접속을 해서 아무 문제가 없었다. 
하지만 key 파일이 아닌 곳에 접속을 해보니 이상한 에러가 났다. 

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

해결방법

sudo vi /etc/ssh/ssh_config
# Host *
#   ForwardAgent no
#   ForwardX11 no
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   IdentityFile ~/.ssh/id_ecdsa
#   IdentityFile ~/.ssh/id_ed25519
#   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
#   UserKnownHostsFile ~/.ssh/known_hosts.d/%k
Host *
    SendEnv LANG LC_*
    HostkeyAlgorithms ssh-dss,ssh-rsa
    KexAlgorithms +diffie-hellman-group1-sha1

위에 것이 제 맥북에 적용한 내용입니다. 

방법 

 Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
  MACs hmac-md5,hmac-sha1,umac-64@openssh.com
  => 주석해제

하단에 아래에 추가하시면 됩니다. 

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

 

728x90

공유하기

facebook twitter kakaoTalk kakaostory naver band
loading