Ubuntu终端连接出错:Couldn’t agree a client-to-server cipher (available: aes128-ctr,aes192-ctr......)

来源:互联网 发布:c 程序员网站 编辑:程序博客网 时间:2024/06/05 14:37

在安装了SSH-Server之后终端连接的过程中被中断

sudo apt-get install openssh-server

抛出的异常信息

Couldn’t agree a client-to-server cipher (available: aes128-ctr,aes192-ctr,aes256-ctr,chacha20-poly1305@openssh.com)

原因

CBC block cipher mode of operation已经不够安全了,所以新的SSH-Server不支持该模式,而用的终端又不支持上面的CTR的模式所以就被拒绝连接了


解决方法

有两种方案

一种是把你的终端更新至最新版本

另一种是更改支持的加密算法

vi /etc/ssh/sshd_config
在最后一行添加

Ciphers aes128-ctr,aes192-ctr,aes256-ctr,chacha20-poly1305@openssh.com,aes256-cbc
然后重新启动ssh

/etc/init.d/ssh restart




原创粉丝点击