关于git:macOS-ssh-error-unable-to-negotiate-with-IP-no-matching-cipher

64次阅读

共计 1360 个字符,预计需要花费 4 分钟才能阅读完成。

环境:macOS Mojava version 10.14

在更新了 Mac OS 当前用 ssh push 代码到服务器呈现了上面这个谬误。

ssh error: unable to negotiate with IP: no matching cipher found.Their offer: aes256-cbc,aes192-cbc,aes128-cbc… 

Unable to negotiate with XX.X.X.XXX port XX: no matching cipher found. Their offer: aes256-cbc,aes192-cbc,aes128-cbc
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

呈现谬误的起因是要连贯的代码仓库服务端的 ssh 版本过低,客户端与服务端的 cipher 没有匹配上,咱们须要在本人的客户端(降级 OS 后的 Mac)从新启用老的 cipher , 这样就能从新建设起连贯了。

具体步骤如下:

第一步:terminal 输出 sudo nano /etc/ssh/ssh_config 

atcs-air:~ XXX$ sudo nano /etc/ssh/ssh_config

第二步:找到 Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,删除这行后面的 #号。

# 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
#   Protocol 2
   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_*

第三步:保留 ssh_config 这个文件,退出。而后就能够和以前一样通过 ssh 连贯代码仓库服务器了。

参考链接:
https://www.itechlounge.net/2…

https://discussions.apple.com…

正文完
 0