sshsecureshell登录Ubuntu出错,server responded “algorithm negotiation failed”

首先贴出错误原因,sshsecureshell连接Linux时提示server responded "algorithm negotiation failed”的原因是Linux下ssh服务的加密算法错误

sshsecureshell是Windows下连接使用ssh连接Linux的一个非常实用的工具,但是使用sshsecureshell登录Linux系统之前需要进行配置,在Linux下安装SSH服务,本教程以sshsecureshell连接ubuntu20.04为例讲解如何使用sshsecureshell

1、ubuntu下安装SSH服务并配置允许远程登录

依次输入以下命令,安装ssh服务

sudo apt-get update
sudp apt-get upgrade
sudo spt-get install openssh-server

配置ssh,修改/etc/ssh/sshd_config文件
实用vi打开配置文件,修改PermitRootLogin prohibit-passwordPermitRootLogin yes
如下图
在这里插入图片描述重启ssh服务,使用命令sudo service ssh restart

sudo service ssh restart

此时SSH服务就已经打开了,可以使用ssh工具远程登录ubuntu,但是使用sshsecureshell登录ubuntu还需要进行配置

2、使用sshsecureshell登录ubuntu

连接步骤如下图
在这里插入图片描述
Host Name是ubuntu的IP地址
user Name是ubuntu的用户名,选择root或其他用户都可以
port是ssh服务的端口,不需要修改
Authentication是身份验证,选择Password

此时会出现错误就是我们标题的错误**server responded "algorithm negotiation failed”**见下图
在这里插入图片描述原因是ssh服务的加密方式有问题,下面来解决这个问题

3、如何解决server responded "algorithm negotiation failed

出现这个问题要修改/etc/ssh/sshd_config文件,在配置文件的最后添加如下内容,添加之后如下图

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-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,curve25519-sha256@libssh.org

在这里插入图片描述使用sudo service ssh restart重启ssh服务,如果不报错就按照第二步的方法连接即可,如果如果报错为
**Job for ssh.service failed because the control process exited with error code.See “systemctl status ssh.service” and “journalctl -xe” for details.**请查看我的另一篇博客内容

https://blog.csdn.net/qq_45120255/article/details/120459204

重启SSH服务的命令

重启SSH服务的命令
sudo service ssh restart
  • 1
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值