更改ssh服务远程登录的配置。主要的操作是在ssh的配置文件加入下面5行文本到第13行前。(下面参数的具体含义见其他课程。)

Port 52113
PermitRootLogin no
PermitEmptyPasswords no
UseDNS no
GSSAPIAuthentication no

[root@XM ~]# sed '13i Port 52113\nPermitRootLogin no\nPermitEmptyPasswords no\nUseDNS no\nGSSAPIAuthentication no' 1.txt
1
2
3
4
5
6
7
8
9
10
11
12
Port 52113
PermitRootLogin no
PermitEmptyPasswords no
UseDNS no
GSSAPIAuthentication no
13
14
15
16
17
18
19
20
[root@XM ~]#

posted on 2018-10-14 13:12  小米m  阅读(442)  评论(0编辑  收藏  举报