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

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

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-11-5 00:00:05 | 显示全部楼层 |阅读模式
[d:\~]$ ssh 192.168.2.138
+ N8 u4 D3 R9 U  r+ f( K8 E3 w
# n% W3 ?) Q! T4 {( |  mConnecting to 192.168.2.138:22...
9 G% g+ s6 S3 E$ S/ |. i* NConnection established.
  A2 e3 j7 |" e( FTo escape to local shell, press 'Ctrl+Alt+]'.& Q/ J, d+ ^" [3 X6 q' l( d% z
Connection closed by foreign host.3 ^' w9 I& l% L# S2 q6 _3 L4 r
Disconnected from remote host(192.168.2.138:22) at 10:09:49.
  S0 s1 I; E3 X* ~Type `help' to learn how to use Xshell prompt.
: C3 P( v2 h0 Q' [0 z' ~( z# M1 R6 ~
xshell5连接ubuntu20.10失败,提示"找不到匹配的key exchange算法"3 x4 A1 G# M7 J$ |* A  o4 V

3 q* K# `! k) d% F4 e/ N) b/ i, M2 E. M3 ~( I" y' ~
解决办法:6 i0 g3 ~; I. ]3 D, h  O
在sshd_config 文件中填加 增加ubuntu20.10 key excange算法diffie-hellman-group14-sha1. [$ z! R' E) _/ O7 `

  M% \/ N. {! F9 P

0 u+ u' X# E$ ~
6 g$ ^2 L& I- O$ |! P$ ~. secho "KexAlgorithms +diffie-hellman-group14-sha1"  >>/etc/ssh/sshd_config 4 V& Z! @- |5 t" m4 w

; @( a% o5 C9 h; b重启sshd服务生效:; c" n( C& x1 ?) Z- ]
root@localhost:~# systemctl restart sshd
9 |" r* |1 j( o/ X' P" }  c+ L. T; |) [5 P8 `' s  x
root@localhost:~# systemctl status sshd
$ N% I2 D8 w$ z/ }; a' }: T/ b● ssh.service - OpenBSD Secure Shell server
' s$ y/ d8 d2 p/ ^' t5 R     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)- \+ a; k5 |; h- {! }! R
     Active: active (running) since Thu 2021-11-04 02:23:05 UTC; 54s ago
* O& H- ^0 W/ n8 Z. Q& O; h; n       Docs: man:sshd(8)) s7 `! `3 X: {
             man:sshd_config(5)
8 l) d  u6 q9 }5 V- i    Process: 2005 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
7 `: j* O! i1 k5 S( k' i9 R9 M   Main PID: 2006 (sshd)
( ]2 V+ W3 M( u2 i9 A- I      Tasks: 1 (limit: 4606)
% p! e; W3 Q9 Z0 H) u     Memory: 1.3M9 C) g: B/ W$ ~: u; `6 M) k
     CGroup: /system.slice/ssh.service
  R0 @7 {2 B, P/ o  R4 s             └─2006 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups8 g; l) o- }) \5 c, s" n* l9 l
Nov 04 02:23:05 localhost systemd[1]: Starting OpenBSD Secure Shell server...% v8 m. j6 O  W1 E% @; N
Nov 04 02:23:05 localhost sshd[2006]: Server listening on 0.0.0.0 port 22.; s8 `' ~  l3 y" F! V, w6 B6 K
Nov 04 02:23:05 localhost sshd[2006]: Server listening on :: port 22.6 d0 O8 V3 ?4 c1 A4 ^
Nov 04 02:23:05 localhost systemd[1]: Started OpenBSD Secure Shell server.9 L+ o( F# a8 Z& ^7 r

* U: G$ B. g% F" }% J$ uConnecting to 192.168.2.138:22...
# a: }! e) V' u9 W  Z! b! jConnection established.: ?. S- _6 ~" \5 ^: s
To escape to local shell, press 'Ctrl+Alt+]'.
7 \2 [9 t4 w$ \/ a0 @1 r; U+ FWelcome to Ubuntu 20.10 (GNU/Linux 5.8.0-63-generic x86_64)
9 y8 X$ ~" V1 u- ` * Documentation:  https://help.ubuntu.com
0 }5 F* m1 R! n  d2 Q! E * Management:     https://landscape.canonical.com
$ B' O+ C1 W+ J * Support:        https://ubuntu.com/advantage- J  n6 O$ v8 ]+ z" t9 b/ b- q( \
  System information as of Thu Nov  4 02:16:49 AM UTC 2021- K' d$ p  s  e- H7 j
  System load:  0.0               Processes:             134
- `+ e7 o' v# z1 Q+ x# J  Usage of /:   76.0% of 2.99GB   Users logged in:       1; k8 r7 ^+ N! m( ~. L5 m* A& G* c5 x* E
  Memory usage: 5%                IPv4 address for ens3: 192.168.2.138& t( ~) |. b: [  s( ~$ a+ \) E
  Swap usage:   0%
7 y1 ?  M# o# R) f( R, m- i4 t
: [3 H( N5 y& U, Q' v76 updates can be installed immediately.# x; n2 }" q# b1 O4 T, L
0 of these updates are security updates.
3 Z, d7 g* u- e* yTo see these additional updates run: apt list --upgradable
/ I( w: E6 e. g" u  K8 IYour Ubuntu release is not supported anymore.% @! V3 M" ?' Q' Q& \7 L7 Q  `  a' `
For upgrade information, please visit:* v/ S* c( Y! l  S( i
http://www.ubuntu.com/releaseendoflife) j! [& f9 t5 o. j
New release '21.04' available.4 C$ I$ Z$ Z( i. K0 a4 J! L# d
Run 'do-release-upgrade' to upgrade to it.) M# D3 k, v7 I5 r
) i, e; Q( v6 k( p  G
Last login: Thu Nov  4 02:06:54 2021' ]) C( X6 P9 G8 r& v6 A. u9 L
ubuntu@localhost:~$
" N% G- S: d9 M
8 ]7 j5 _! t5 l: l8 h
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 01:58 , Processed in 0.023403 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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