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

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

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-11-5 00:00:05 | 显示全部楼层 |阅读模式
[d:\~]$ ssh 192.168.2.138$ u: \7 ], G3 l$ V) ~: C' S3 G
. [' {3 P- Q* f) E
Connecting to 192.168.2.138:22...* y$ M5 {$ S* f5 s4 i1 g
Connection established.
3 m7 z5 b; R3 pTo escape to local shell, press 'Ctrl+Alt+]'.
% C( H( V& F, V6 Q; G6 X, OConnection closed by foreign host." |: u% W& X1 o& Y' V1 z* d
Disconnected from remote host(192.168.2.138:22) at 10:09:49.
9 h) a% G, y! {3 H. A# C! \5 \Type `help' to learn how to use Xshell prompt.# [: ?' W9 J+ k$ |. K
& s, n4 u" }( p8 P2 Y0 m2 Z$ p
xshell5连接ubuntu20.10失败,提示"找不到匹配的key exchange算法": @3 B2 F% E0 \

6 m9 P+ T* n2 v
0 X( M. y0 o8 D3 f+ o& X解决办法:; O, q; C9 U/ l7 Y! {
在sshd_config 文件中填加 增加ubuntu20.10 key excange算法diffie-hellman-group14-sha1
) N( ^0 D. G2 K& {% n2 A' D
7 K  h2 I; O# i- O  Q6 Q# V

# X, v7 d; i# ?: s3 x( f+ i4 d$ I  |/ K! ^4 f6 x+ ?
echo "KexAlgorithms +diffie-hellman-group14-sha1"  >>/etc/ssh/sshd_config
& W4 y3 x9 N( ?) C5 H
+ D+ L- b( X5 m9 x/ N  p# r重启sshd服务生效:
% r. x! \! v5 E( zroot@localhost:~# systemctl restart sshd0 `: M3 F% `. I6 p1 ~- P$ v( @, U
- I! n! S4 q! J9 e: j; B2 G
root@localhost:~# systemctl status sshd ! k/ D) }! r' V! s( r* R6 I- @0 Q
● ssh.service - OpenBSD Secure Shell server
' ?* U" m9 M  q% M* C& G1 I     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
6 w& O, }/ P1 V+ g' _/ r6 }     Active: active (running) since Thu 2021-11-04 02:23:05 UTC; 54s ago" f6 n8 u  c" W  ]
       Docs: man:sshd(8)
6 q& ]: X% C% ?' N# y" I$ O             man:sshd_config(5)
8 j' }# d$ @7 O  }% N    Process: 2005 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
" M8 w3 q- V$ }) [; u   Main PID: 2006 (sshd)6 x+ e& G: c* R( s* S9 e$ j9 w
      Tasks: 1 (limit: 4606)  ^+ U/ b+ U, }' v/ f
     Memory: 1.3M8 _/ t, u7 r; Y" a1 Y+ w& w* A
     CGroup: /system.slice/ssh.service
6 ^! l: I- V: k1 M7 L  U             └─2006 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups5 \6 v; I3 ]/ g& \) I# @
Nov 04 02:23:05 localhost systemd[1]: Starting OpenBSD Secure Shell server...
+ K# y6 P1 E* J" dNov 04 02:23:05 localhost sshd[2006]: Server listening on 0.0.0.0 port 22.0 v* `7 @: C" l
Nov 04 02:23:05 localhost sshd[2006]: Server listening on :: port 22.
9 W- E) c, p6 d6 s8 N6 O# _Nov 04 02:23:05 localhost systemd[1]: Started OpenBSD Secure Shell server.
$ g  {: V2 T" @1 p" w
5 W/ f( ]7 B" l7 o, xConnecting to 192.168.2.138:22...! K+ i4 c, g' a) Q8 ~
Connection established.1 e% r5 c4 A# ]2 `" d- {
To escape to local shell, press 'Ctrl+Alt+]'., w  X% E5 C+ V& c; ?/ M1 P! `* X
Welcome to Ubuntu 20.10 (GNU/Linux 5.8.0-63-generic x86_64)
8 H! B; d+ g1 o- z' M * Documentation:  https://help.ubuntu.com8 u3 j2 X; ]6 b3 e( U, N
* Management:     https://landscape.canonical.com( ~2 Z2 I. I% s7 G
* Support:        https://ubuntu.com/advantage
/ b1 t$ j! }5 @1 Z+ J  System information as of Thu Nov  4 02:16:49 AM UTC 2021
! q4 ]7 g& z& ?; F  System load:  0.0               Processes:             1340 p) v9 v: v) i  ^9 B. a" U" ]% T
  Usage of /:   76.0% of 2.99GB   Users logged in:       14 d1 g1 I( }5 ~7 t" w- x
  Memory usage: 5%                IPv4 address for ens3: 192.168.2.138
0 x9 x* s  g. p, g% p  Swap usage:   0%
) m3 j+ n! Y4 \
" u* g$ `" V) L" `76 updates can be installed immediately.% L" c" _* P' @8 w' m7 \
0 of these updates are security updates.
) m6 B2 p- N5 A5 I, S+ L, u: J# pTo see these additional updates run: apt list --upgradable8 |- F* o; P) U6 {; y
Your Ubuntu release is not supported anymore.
/ U: J: q2 W  h- p; }: }For upgrade information, please visit:
7 u& y& U& p3 D2 \1 r8 Nhttp://www.ubuntu.com/releaseendoflife) C" S' S0 P8 |! F& v
New release '21.04' available.
4 n* R/ ?; ~' W- Y2 tRun 'do-release-upgrade' to upgrade to it.5 O8 N  g8 x( R. X- o

  Z8 _/ A0 H1 E/ F7 f8 Q: mLast login: Thu Nov  4 02:06:54 20218 e9 E6 `6 Y2 K+ z
ubuntu@localhost:~$   e2 w6 f4 Y4 ]+ [$ q2 O6 m
, p0 P: g/ a# S0 Z& _! o
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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