CentOS   发布时间:2022-04-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了centos 7.0 修改ssh默认连接22端口 和 添加防火墙firewalld 通过端口大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

首先 先做的就是 修改ssh的默认端口22 需要修改文件 /etc/ssh/sshd_config 使用命令 vi /etc/ssh/sshd_config 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 4

首先 先做的就是 修改ssh的认端口22

需要修改文件

/etc/ssh/sshd_config

使用命令

vi /etc/ssh/sshd_config

1
2
@H_502_21@ 3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@H_616_102@ 35
36
37
38
39
40
41
42
@H_@R_696_11277@_118@ 43
@H_801_120@ 44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
[root@localhost ~]# vi /etc/ssh/sshd_config
# $OpenBSD: sshd_config,v 1.90 2013/05/16 04:09:14 dtucker Exp $
@H_502_21@
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/bin:/usr/bin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible,but leave them commented. Uncommented options override the
# default value.
# If you want to change the port on a SELinux system,you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTnumbER
#
Port 48489
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
# The default requires explicit activation of protocol 1
#Protocol 2
# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
@H_616_102@ #ServerKeyBits 1024
# Ciphers and keying
#RekeyLimit default none
# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
@H_@R_696_11277@_118@ SyslogFacility authprIV
@H_801_120@ #LogLevel INFO
# Authentication:
#LoginGraCETime 2m
#PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
#RSAAuthentication yes
#PubkeyAuthentication yes
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none

大佬总结

以上是大佬教程为你收集整理的centos 7.0 修改ssh默认连接22端口 和 添加防火墙firewalld 通过端口全部内容,希望文章能够帮你解决centos 7.0 修改ssh默认连接22端口 和 添加防火墙firewalld 通过端口所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签:2277.0centosfirewalldssh修改添加端口连接通过防火墙默认
猜你在找的CentOS相关文章
其他相关热搜词更多
phpJavaPython程序员load如何string使用参数jquery开发安装listlinuxiosandroid工具javascriptcap