找回密码
 注册
查看: 1746|回复: 0

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

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-11-5 00:00:05 | 显示全部楼层 |阅读模式
[d:\~]$ ssh 192.168.2.138
7 x1 q5 L+ s/ s" h3 B' L0 P" y4 \
& T5 Q9 e  W  Y5 ]# [Connecting to 192.168.2.138:22...( s' x6 [7 X* [7 Q1 B, t" N7 B; V, y
Connection established.
4 e: T* P' _. x+ l$ S- _" u% e9 |To escape to local shell, press 'Ctrl+Alt+]'.* a1 `3 ?- \0 h' J7 q
Connection closed by foreign host.2 u2 f. l: c& t; V
Disconnected from remote host(192.168.2.138:22) at 10:09:49.
# l% |" ~3 x' G( hType `help' to learn how to use Xshell prompt.* B! }% |# y" W) {; l

' u7 _5 m% e) }  O& v, gxshell5连接ubuntu20.10失败,提示"找不到匹配的key exchange算法"( y, e5 R# G6 L$ {  n' `' F7 {% t
& k& @' T. ^" h

# e3 W/ R, z4 N, T6 U# |解决办法:
1 J! e, j1 ~9 h6 r3 z# I( ~& T: }' r在sshd_config 文件中填加 增加ubuntu20.10 key excange算法diffie-hellman-group14-sha1
0 p; X, D5 ]* G3 @' N- k$ c8 F+ ?4 k
- _' G" E1 t5 J+ E' L) M
7 [9 r5 z$ k" z
echo "KexAlgorithms +diffie-hellman-group14-sha1"  >>/etc/ssh/sshd_config
$ @1 l7 B$ ], B& `) Y4 h% x4 D! C# ~8 M) z9 x0 W7 b
重启sshd服务生效:
4 c9 u! v" B! I. z8 M0 Sroot@localhost:~# systemctl restart sshd
# X, ^$ P* |  }' L( E2 s- D6 A" k. {1 I" V- S* x6 f
root@localhost:~# systemctl status sshd , N. c5 a9 p% C1 ?8 H* A
● ssh.service - OpenBSD Secure Shell server
( b3 q0 z; F& B4 Y     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)& w' b: G' C' J* n( f- H3 q
     Active: active (running) since Thu 2021-11-04 02:23:05 UTC; 54s ago0 m) ^( o0 [" _# m: `4 I
       Docs: man:sshd(8). ~0 f! ~3 y6 a# G- y. s
             man:sshd_config(5)7 y) \9 U5 t! z, S$ ?$ A
    Process: 2005 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
$ \' X! [! e" A0 ?4 B   Main PID: 2006 (sshd)
& K; H# i- ?, p- i      Tasks: 1 (limit: 4606)$ j0 P' |; U9 J0 {  Z
     Memory: 1.3M5 H( J1 y# g) P; A: l) j( G
     CGroup: /system.slice/ssh.service
! }" e/ u, E, M: r2 K: n             └─2006 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
; N9 X+ t+ w5 V5 {3 `  W& m* NNov 04 02:23:05 localhost systemd[1]: Starting OpenBSD Secure Shell server...9 Q. v5 V' i* P. ?1 C  l
Nov 04 02:23:05 localhost sshd[2006]: Server listening on 0.0.0.0 port 22.: h; w2 o0 t& r% ^( d
Nov 04 02:23:05 localhost sshd[2006]: Server listening on :: port 22.
' X+ g0 k: s' i5 S6 U" e( @Nov 04 02:23:05 localhost systemd[1]: Started OpenBSD Secure Shell server.# d/ v+ z5 v. J2 K- p* i; E6 L
* v# s* o6 X' V# \9 E7 V
Connecting to 192.168.2.138:22...
3 p. d/ x: S# V' C! pConnection established.
& M( o4 c7 t5 LTo escape to local shell, press 'Ctrl+Alt+]'.
! e  L5 K. Y. h" C" ?Welcome to Ubuntu 20.10 (GNU/Linux 5.8.0-63-generic x86_64)5 {. \; m" P7 a0 Q4 E
* Documentation:  https://help.ubuntu.com
) u+ V0 F  n! z * Management:     https://landscape.canonical.com$ n( H/ u% ^, J  t1 ^0 D+ q; P% z& ~; @
* Support:        https://ubuntu.com/advantage
8 g2 J8 b# P# d: |" F( o  System information as of Thu Nov  4 02:16:49 AM UTC 2021
* g  ^# G* f1 V+ v  System load:  0.0               Processes:             134* K; n. `' Y. D, {" N9 {2 J% y
  Usage of /:   76.0% of 2.99GB   Users logged in:       13 M& I6 w+ \) |) w9 e6 o: B# i: b
  Memory usage: 5%                IPv4 address for ens3: 192.168.2.138
8 P; b8 F' a4 C! S  Swap usage:   0%6 ?  m' l2 V& o& \
5 _4 b+ }. F4 p+ g/ d% y6 H
76 updates can be installed immediately.
$ a: x1 I" K0 K0 of these updates are security updates.
' @; U, A) e& q7 q7 N' \* m$ ~To see these additional updates run: apt list --upgradable: ?4 R: G0 ?; v% S1 |1 s, M4 b4 T
Your Ubuntu release is not supported anymore.6 g  Q; D% n# e! J0 e$ q1 E
For upgrade information, please visit:
& ^" M- _( f, p, I/ Khttp://www.ubuntu.com/releaseendoflife
! q8 a) ?( ?0 k& K$ ~2 V% g' tNew release '21.04' available.% p8 o- I( P* m
Run 'do-release-upgrade' to upgrade to it.
& l# H/ _! I$ F4 J2 ]/ e* P
, h' i) ]2 q+ O3 b/ A9 x8 \# q' JLast login: Thu Nov  4 02:06:54 2021- a" P6 @# X0 P* N( u  a& j
ubuntu@localhost:~$
4 v2 Y: i3 A; h1 W2 J, ^4 ]
' d3 C' e; V, u, b4 `- v
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 03:00 , Processed in 0.020801 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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