Debian8|Debian8 SSH登录失败(密钥交换失败)
发行版及版本号:
debian:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:Debian GNU/Linux 8.6 (jessie)
Release:8.6
Codename:jessie
通过
apt-get install -y openssh-server
命令安装了sshd,并修改配置文件使root用户可以通过密码登录debian:~# sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/g' /etc/ssh/sshd_config
debian:~# systemctl restart ssh.service
使用SecureCRT 7.x可以登录,但是ssh secure shell client不能登录,提示如下:
ssh client 提示:Server responded"Algorithm negotiation failed"通过网络搜索得知,openssh升级后,删除了一些旧的加密算法,所有导致部分ssh clients不能登录。根据网友的分享,我将这些加密算法添加到sshd_config,然后重启启动sshd。
Key exchange with the remote host failed. This can happen for example computer does not support the selected algorthms.
debian:~# cat << EOF >>/etc/ssh/sshd_config
# there are old encryption algorithms
Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc
MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96
KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdg
EOF
debian:~# systemctl restart ssh.service
【Debian8|Debian8 SSH登录失败(密钥交换失败)】然后检查ssh secure shell client,已经成功登录了。
推荐阅读
- SSH|SSH 免密
- ssh生成公钥秘钥
- 为Google|为Google Cloud配置深度学习环境(CUDA、cuDNN、Tensorflow2、VScode远程ssh等)
- 运维|如何限制IP 通过 SSH连接服务器
- 运维|Linux 禁止用户或 IP通过 SSH 登录
- 【微信开放平台】微信第三方扫码登录(亲测可用)
- 部署教程
- [内附完整源码和文档]|[内附完整源码和文档] 基于JSP SSH框架的客车网上售票系统的设计与实现
- 小程序登录、用户信息相关接口调整
- 实体店商家通过微信小程序解决流量和租金等问题-小程序登录小程序源码