易陆发现互联网技术论坛

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

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

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

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

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

x
[d:\~]$ ssh 192.168.2.138
  B* o, i, T+ r" V* l. [: h' L8 T) |' q8 ?3 f
Connecting to 192.168.2.138:22...$ m" L# k% N+ ]- S8 t/ K2 ^2 d3 G
Connection established.6 P9 x3 H' w0 R3 c. N
To escape to local shell, press 'Ctrl+Alt+]'.
* M/ Q( I+ }! K' z+ K& p$ c6 iConnection closed by foreign host.
8 U' _8 D1 O8 u1 O! s5 M  yDisconnected from remote host(192.168.2.138:22) at 10:09:49.
& o/ V1 M7 ]. a- UType `help' to learn how to use Xshell prompt.
7 h; ~! ^& f" E! F
. G$ K' S7 u8 c/ U; p8 Fxshell5连接ubuntu20.10失败,提示"找不到匹配的key exchange算法"0 [0 N6 D% ^/ n; r% M
$ D2 U# W) H" v$ l

7 e2 a- r0 C3 c6 f) G% [2 C" y, Y0 W解决办法:
, W9 Q# E6 Q/ b5 U2 p- F在sshd_config 文件中填加 增加ubuntu20.10 key excange算法diffie-hellman-group14-sha1
) Y3 X2 O' v. l" N5 F: J
- a* Z2 w5 t. K8 X( D/ A
+ ^# I1 @) A; M  V( {9 ]

! u7 K# a, g& o3 d4 s# L) W2 Z3 w, Hecho "KexAlgorithms +diffie-hellman-group14-sha1"  >>/etc/ssh/sshd_config
/ z/ ~, ]. f" X" Z( Q$ f( ^- Q1 J0 R, \+ A' k, p
重启sshd服务生效:
) [- p- u1 w# k" v4 Q  q: F% S! sroot@localhost:~# systemctl restart sshd
/ E0 ~5 U0 ^6 E- |% S! j
" N5 P5 U* e5 f' O# {root@localhost:~# systemctl status sshd , T$ H1 {& o* N0 r2 L
● ssh.service - OpenBSD Secure Shell server: Z5 E( J7 F$ X
     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
5 @. h( |' [0 c     Active: active (running) since Thu 2021-11-04 02:23:05 UTC; 54s ago' c/ T9 {' }0 j" `5 u# T
       Docs: man:sshd(8). @! H  b6 \/ u8 V
             man:sshd_config(5)
! Z4 z. `5 p' n) p    Process: 2005 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
5 O. Q  j  l7 E& |" H+ J   Main PID: 2006 (sshd)7 L! Y2 n8 L+ _; E8 o9 k% o8 G
      Tasks: 1 (limit: 4606)
) e* m2 @9 Y2 e, {     Memory: 1.3M: g% w& Z" Q' @8 Q- R
     CGroup: /system.slice/ssh.service
/ f5 E' |9 \7 `* n; W) B+ H, [3 z% u. d             └─2006 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
! y; j1 V# y: f5 `7 O: K6 q( X! yNov 04 02:23:05 localhost systemd[1]: Starting OpenBSD Secure Shell server...
" R  @" P  [2 h+ \0 L: ^Nov 04 02:23:05 localhost sshd[2006]: Server listening on 0.0.0.0 port 22.% N+ ?: \) W; W, {& I- f' L
Nov 04 02:23:05 localhost sshd[2006]: Server listening on :: port 22.9 }# b% F# V8 R# |: h4 \( G. e  c6 K
Nov 04 02:23:05 localhost systemd[1]: Started OpenBSD Secure Shell server.) z7 G; H; x) i$ ]) W! c# D% q
7 l8 T! w0 x/ g# R) y) i
Connecting to 192.168.2.138:22...
6 Z2 v: i6 c/ J9 MConnection established.
$ I( ~, q7 |# {1 y2 @6 mTo escape to local shell, press 'Ctrl+Alt+]'.0 X) Q5 n5 s9 l8 `! a( ]1 V
Welcome to Ubuntu 20.10 (GNU/Linux 5.8.0-63-generic x86_64)# I9 Z% f6 F+ ?* m2 K: U8 ^
* Documentation:  https://help.ubuntu.com* Z0 P/ T8 |! z# ^; \2 _) |
* Management:     https://landscape.canonical.com  S- O. @2 x& l7 t
* Support:        https://ubuntu.com/advantage
7 u8 I1 R2 j* e' T* n( T  System information as of Thu Nov  4 02:16:49 AM UTC 2021
& w- z0 a+ `$ H# d7 H+ g  System load:  0.0               Processes:             134$ e5 K# ?& Z8 k, X& T7 w- f% r
  Usage of /:   76.0% of 2.99GB   Users logged in:       1; W- Z$ B1 o% O
  Memory usage: 5%                IPv4 address for ens3: 192.168.2.138
% a% m+ a, C, w% E3 f+ o0 @  Swap usage:   0%
4 @) b9 S/ g0 P; c4 s; G' e$ Y
7 M) x! B- @0 v6 u7 u6 ~' \76 updates can be installed immediately.# V7 s/ Z0 E! j9 n0 V3 o& I
0 of these updates are security updates.) A3 S5 S; n' B
To see these additional updates run: apt list --upgradable  G& R1 b: ?! C
Your Ubuntu release is not supported anymore.1 G$ \: h* W/ y* w0 s
For upgrade information, please visit:
) j/ }5 r+ T  q( L9 w* Ihttp://www.ubuntu.com/releaseendoflife3 V; m8 [8 Y; k
New release '21.04' available.; v: Q' J0 ?7 q1 l
Run 'do-release-upgrade' to upgrade to it.: x1 Q4 _% r6 N' [: u0 c* b
+ G! _5 L' z) R+ ]0 a& y6 `* {
Last login: Thu Nov  4 02:06:54 2021# G! R$ y( Y+ S; K: x
ubuntu@localhost:~$
; d# p$ v. s' |! c& h* B4 x) P7 d: p6 y! \3 X* _% ~& {
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

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

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

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

GMT+8, 2026-4-8 21:18 , Processed in 0.041705 second(s), 22 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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