易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 1724|回复: 0
收起左侧

xshell5连接ubuntu20.10失败,提示"找不到匹配的key exchange算法"

[复制链接]
发表于 2021-11-5 00:00:05 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
[d:\~]$ ssh 192.168.2.138. U6 e4 b- ?' Z4 }) X3 c
1 c* b% x: V$ M+ s
Connecting to 192.168.2.138:22...
& Z0 T' o0 {  Y0 }/ GConnection established.5 }' Y$ A, x4 n- r  l$ b9 }' x
To escape to local shell, press 'Ctrl+Alt+]'.
' u+ N: @- m: d; I1 w' xConnection closed by foreign host.
7 y! ?# U0 x- ^; p4 _; Y: a; MDisconnected from remote host(192.168.2.138:22) at 10:09:49.
  ?- n4 M) k  _* B, M. w$ R: h. N) K9 SType `help' to learn how to use Xshell prompt.
0 [1 \9 l. w+ r, R/ u# y* B! P
& `$ D8 ]8 h/ u5 x7 x7 t0 Axshell5连接ubuntu20.10失败,提示"找不到匹配的key exchange算法"
1 V4 ~8 L0 \; d( X' K/ o7 o+ V! @$ p1 p& _

( n# d$ r1 K" _$ N5 p7 E解决办法:# J8 R: `+ p' y
在sshd_config 文件中填加 增加ubuntu20.10 key excange算法diffie-hellman-group14-sha1
$ ?* j! H) U- r+ k# x- h
- z+ ?' d; `( r

0 @, {. y. }# {8 g) w- R4 r# X6 K8 I1 ?9 N  N' y
echo "KexAlgorithms +diffie-hellman-group14-sha1"  >>/etc/ssh/sshd_config
6 t" c( g  m2 w5 O" G/ n: E, I( q6 {8 g; k
重启sshd服务生效:
  e; i4 Y" u# N- Q3 |2 w0 G, X0 Lroot@localhost:~# systemctl restart sshd
) B$ u3 y: ^9 Z( ]% Q1 V& r3 |' Q
2 z+ Y9 j# J2 x2 Eroot@localhost:~# systemctl status sshd * V, e! X" d8 y1 A
● ssh.service - OpenBSD Secure Shell server
" i) e8 R8 B5 x) j' o; E, U# C     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)" s$ r8 g4 P2 m+ Z# |  s1 A
     Active: active (running) since Thu 2021-11-04 02:23:05 UTC; 54s ago: n9 y2 V7 ^- q' x9 M+ x
       Docs: man:sshd(8), p) m/ k7 P" |, Z4 p
             man:sshd_config(5)
% _3 g5 |) x8 [. j+ \; q4 L2 x    Process: 2005 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)9 U( R" V0 y* ~. V( B
   Main PID: 2006 (sshd)
% Z$ B0 ~9 F! w3 `      Tasks: 1 (limit: 4606)3 q- E: m4 S9 h" Q( p' y* c
     Memory: 1.3M: ?7 o: t0 @2 e! A4 `: D
     CGroup: /system.slice/ssh.service
! t0 R  ^8 d8 s( o' g             └─2006 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
) {$ a/ i) D& e0 b! Z* E3 {Nov 04 02:23:05 localhost systemd[1]: Starting OpenBSD Secure Shell server...
& u- n. |  w, C7 S. ]# ONov 04 02:23:05 localhost sshd[2006]: Server listening on 0.0.0.0 port 22.+ ]# l; q7 `1 Y% z1 }; R+ \6 a
Nov 04 02:23:05 localhost sshd[2006]: Server listening on :: port 22.0 i1 K8 b+ D4 m% l! J: d  p) v# P
Nov 04 02:23:05 localhost systemd[1]: Started OpenBSD Secure Shell server.
% Q5 ^# J- r8 C3 V3 }3 r$ e1 L3 ~5 I" p  h
Connecting to 192.168.2.138:22.... ^% C6 n/ q* W) T, e! o
Connection established.
$ [4 E- B  j& \. UTo escape to local shell, press 'Ctrl+Alt+]'.
; _3 P0 @' x( hWelcome to Ubuntu 20.10 (GNU/Linux 5.8.0-63-generic x86_64)
* ~" X1 k8 P+ D' Y2 R0 b# K * Documentation:  https://help.ubuntu.com
) w* w" N$ `9 [$ o7 | * Management:     https://landscape.canonical.com
1 ]4 `$ f$ n7 g* m' T4 Q * Support:        https://ubuntu.com/advantage( U$ b3 o$ X* W5 P
  System information as of Thu Nov  4 02:16:49 AM UTC 2021" R. F/ {3 n, T& I! e
  System load:  0.0               Processes:             134' D, M+ ]( V! d! v/ M& l- H% I8 S
  Usage of /:   76.0% of 2.99GB   Users logged in:       1
1 Z% a7 D) f( r8 I+ z, l7 _1 n  Memory usage: 5%                IPv4 address for ens3: 192.168.2.138* S8 Q% t+ ]; b
  Swap usage:   0%4 K/ `! k- p5 T3 N6 c7 r6 n
( U1 i( w, w4 @3 o
76 updates can be installed immediately.
  n0 ~- {8 C# K7 s0 b6 R! N. C, Z0 of these updates are security updates.9 W: U9 m, F; Y$ {
To see these additional updates run: apt list --upgradable
2 h- L; m$ `5 P5 Q6 _8 NYour Ubuntu release is not supported anymore.
+ f$ j& [$ z$ _! A. a/ MFor upgrade information, please visit:
% G6 [* g) L! y# n! {! Dhttp://www.ubuntu.com/releaseendoflife
! N# E, m0 W) z& M% jNew release '21.04' available.# }+ f0 w* w3 {: f
Run 'do-release-upgrade' to upgrade to it.
. t& A, h; J9 g+ z8 c+ e7 Q9 ~- k
" s6 V: C* E) E4 j- sLast login: Thu Nov  4 02:06:54 2021
) ?: _( H% m8 C% f, {+ Xubuntu@localhost:~$ ) w8 l" o8 }1 \. m$ ^) H
& Y1 l* g9 ^9 k/ n% A+ a
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 21:23 , Processed in 0.046051 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表