栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Ubuntu 18.04.3 是可以通过SSH连接上的

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Ubuntu 18.04.3 是可以通过SSH连接上的

查找资料并尝试各种方法,终于成功使用SSH连接上阿里云ECS了

其余的服务器都是CentOS的,唯独这个Ubuntu有那么一点点叛逆,死活连不上

最初的错误是:Too many authentication failures

第一篇:

【Linux】使用 ssh 远程连接Ubuntu 报错“server responded “algorithm negotiation failed”_杨jun坚的博客-CSDN博客在阿里云购买了一台服务器,并安装了Ubuntu20.04后,使用ssh 远程登录时,报错"server responded "algorithm negotiation failed”看了网上的解决方法都是在 /etc/ssh/sshd_config 中添加对应一些加密算法,再重启ssh服务。这方法我信了,结果ssh直接挂了,,,结果阿里云自带的远程都没法连接服务器了,幸好有快照可以恢复、挂掉的原因是添加的算法中,不是所有算法都可以支持!!(可能是版本问题导致)使用 sshd -T 可以查看sshttps://blog.csdn.net/yangjjuan/article/details/122279795第二篇:

SSH Client连接Linux出现~server responded “Algorithm negotiation failes”_xiaozhegaa的博客-CSDN博客一、问题描述:近日使用SSH远程连接linux服务器的时候,出现了“server responded ‘Algorithm negotiation failes’”连接不上,查阅了很多资料,才把该问题解决了,特地分享出来给大家 【备注:】如果不会使用SSH Client的读者,建议你们可以去看我写的“如何使用SSH Client”基础入门一篇 http://blog.csdn.net/xiahttps://blog.csdn.net/xiaozhegaa/article/details/78832676

我的重新安装了openssh-server

sudo apt remove openssh-server

sudo apt install openssh-server

在这个环节也是折腾了好一会

ssh -Q cipher
ssh -Q mac
ssh -Q kex

echo 'Ciphers' `ssh -Q cipher | paste -d, -s` >> /etc/ssh/sshd_config
echo 'MACs' `ssh -Q mac | paste -d, -s` >> /etc/ssh/sshd_config
echo 'KexAlgorithms' `ssh -Q kex | paste -d, -s` >> /etc/ssh/sshd_config
#sshd_config文件变化的地方不多

#去掉了这两行前面的注释
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key

#在末尾追加了三行,这三行是我通过上面命令写入的,尽量不要照搬照抄
Ciphers 3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com
MACs hmac-sha1,hmac-sha1-96,hmac-sha2-256,hmac-sha2-512,hmac-md5,hmac-md5-96,umac-64@openssh.com,umac-128@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-md5-etm@openssh.com,hmac-md5-96-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com
KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,curve25519-sha256,curve25519-sha256@libssh.org

sudo service ssh restart

终于成功,这个问题困扰我很久了

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/941904.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号