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

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

这篇文章为后增的,解决了SSH无法连接华为云CentOS 8的问题。

https://blog.csdn.net/lcc0826/article/details/112347213icon-default.png?t=M4ADhttps://blog.csdn.net/lcc0826/article/details/112347213 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值