|
|
[d:\~]$ ssh 192.168.2.138# @: B! Z0 H% }9 o
$ @8 ?& n1 P' m
Connecting to 192.168.2.138:22...( C P/ C8 j! c1 d
Connection established.$ m Q4 v- `& A0 `% Y7 R
To escape to local shell, press 'Ctrl+Alt+]'.
% \) _) ?& k$ p% l. `9 h+ Q9 PConnection closed by foreign host.4 v. g: H7 m) U; S7 T
Disconnected from remote host(192.168.2.138:22) at 10:09:49.
3 _8 ?- X* _) r! c; H' {Type `help' to learn how to use Xshell prompt." [- a3 r+ t0 A7 r
+ h$ x8 c3 G* w0 Zxshell5连接ubuntu20.10失败,提示"找不到匹配的key exchange算法"
+ N4 L0 O5 x7 G' M* v) I& x8 S5 _6 j. o2 F, Q! q! O1 J
) I: x/ q9 R& M9 _: b解决办法:
; X3 ]: c( O. i1 ] H& A在sshd_config 文件中填加 增加ubuntu20.10 key excange算法diffie-hellman-group14-sha1,4 i/ X5 [4 j% c$ a% u- E2 n
# x7 y p$ O; @7 `, h! G
5 g4 \, ~0 V1 e* S/ q$ |4 ]
7 H6 s* I' b' ]4 R
echo "KexAlgorithms +diffie-hellman-group14-sha1" >>/etc/ssh/sshd_config $ {0 [7 O" P& Y6 E
6 h9 H, u) f" N- ^$ e0 o) E重启sshd服务生效:: k( s" v0 A* [
root@localhost:~# systemctl restart sshd
- n& Z. s& e5 q- \: q1 V; E
! A, Q+ Y/ Q; d+ z# I% Groot@localhost:~# systemctl status sshd
: t) {$ D" ]% z3 O/ z1 H0 b9 A● ssh.service - OpenBSD Secure Shell server
# l2 K9 R! x8 ]0 z/ U Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)0 j/ ?, B6 Q; S/ O, u9 E! p
Active: active (running) since Thu 2021-11-04 02:23:05 UTC; 54s ago
# N! d# ]0 q% m6 Q; q Docs: man:sshd(8). ~4 O9 Y+ W$ @$ ?" F
man:sshd_config(5)& U# H7 J" }+ H/ m
Process: 2005 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
k& A% V# F( d& e$ {) D2 u Main PID: 2006 (sshd)
1 x9 Q6 N( c! U$ m' b8 } Tasks: 1 (limit: 4606)) c+ i% g! p0 y% g
Memory: 1.3M
( ~) i% i+ Z6 U/ C( ? CGroup: /system.slice/ssh.service o: k8 D: \4 s% y$ ]
└─2006 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups3 A8 V( O1 ~0 e8 R* H
Nov 04 02:23:05 localhost systemd[1]: Starting OpenBSD Secure Shell server..." k9 r- C9 \# x* n! }
Nov 04 02:23:05 localhost sshd[2006]: Server listening on 0.0.0.0 port 22.) A* D: B+ U. x `3 ?
Nov 04 02:23:05 localhost sshd[2006]: Server listening on :: port 22.# M6 a# ~8 e9 Z5 o4 v- D
Nov 04 02:23:05 localhost systemd[1]: Started OpenBSD Secure Shell server.
* K; i( s+ R$ V) v* K4 y. a0 R# y `, l$ _# r* z( Q
Connecting to 192.168.2.138:22...
1 ^7 P& C6 _4 ^' m8 x+ VConnection established.: s; u* z7 K' v: [8 P/ O: o
To escape to local shell, press 'Ctrl+Alt+]'.
, k" h2 i% o; H/ P- r: R- B8 v- RWelcome to Ubuntu 20.10 (GNU/Linux 5.8.0-63-generic x86_64)6 h4 Y8 g0 u7 K5 |/ S0 f
* Documentation: https://help.ubuntu.com
9 f: [' D) U: c2 |% l6 k3 C * Management: https://landscape.canonical.com
1 ? \( a8 H& E" C2 Y * Support: https://ubuntu.com/advantage5 k) U4 w! Q& q4 ^3 v
System information as of Thu Nov 4 02:16:49 AM UTC 2021
- y7 \+ d- q8 {4 J% a% E9 m" t' G1 P System load: 0.0 Processes: 1346 E& |0 q3 C7 Z" @+ m
Usage of /: 76.0% of 2.99GB Users logged in: 1
& A" y+ r( l; T3 K Memory usage: 5% IPv4 address for ens3: 192.168.2.138% D/ p6 E/ t: f* Q# }5 U$ K0 m
Swap usage: 0%
) J0 l2 k/ ?! R% o; M* d e2 O! C1 u& n; r" n
76 updates can be installed immediately.% v8 {+ \4 S$ K4 S4 `" L2 s8 i
0 of these updates are security updates.
0 m9 K N' Z; N# S( R! tTo see these additional updates run: apt list --upgradable! s+ j1 ]) Z" a+ Q" I; ^& V6 ~$ {
Your Ubuntu release is not supported anymore.
' C# H" M% z/ d: D) R- r; [For upgrade information, please visit:
, L b8 G5 M& l1 H; B/ I. G0 ~http://www.ubuntu.com/releaseendoflife
" x7 K, O/ n) a' fNew release '21.04' available./ }% B$ Q# ^* w' p' `4 c1 Q
Run 'do-release-upgrade' to upgrade to it.
. n) @7 O) Q4 s4 Y$ t7 D/ O& g
# b+ o) c8 T( Y O. FLast login: Thu Nov 4 02:06:54 20213 L5 Q# m1 Q- ^( a) m
ubuntu@localhost:~$
7 P& m$ R8 x* ]# v3 d+ a9 d) f1 r) b( ?& J" p
|
|