Unable to negotiate with 192.168.140.7 port 22: no matching cipher found. Their offer: aes128-cbc Su

 从错误提示上看,是没有匹配到加密算法:aes128-cbc。

1、可以使用 ssh 的 -c 参数来解决,命令如下:

[email protected]:~# ssh -c aes128-cbc [email protected]

2、另一种解决方式---添加配置文件:

Mac High Sierra 以及 Mojava系统使用gerrit出现了问题,查了半天原来使用很简单的方法就可以解决掉,如下:

在~/.ssh/config添加(如果没有config自己创建一个)

# ~/.ssh/config

Host *

    SendEnv LANG LC_*

    Ciphers +aes256-cbc

Unable to negotiate with 192.168.140.7 port 22: no matching cipher found. Their offer: aes128-cbc Su

 

注意:Their offer: aes128-cbc Su 红色出现的是什么,配置文件相应的就写什么

之后又出现:

Unsupported terminal type: xterm-256color, Please try with another type of terminal.

Connection to 192.168.140.7 closed.

 从错误提示上看,是不支持的终端类型:xterm-256color。可以使用如下命令解决:

 export TERM=vt100

 

问题三:不想每次都输入密码。可以使用 sshpass,命令例子如下:

sshpass -p p7954tF ssh -c aes128-cbc [email protected]