修改服务器SSH默认连接22端口

栏目: 服务器 · 发布时间: 7年前

内容简介:我们都知道服务器 SSH 默认连接端口为 22,有时候出于安全方面的考虑需要修改默认的连接端口。那怎么修改服务器ssh端口呢?修改ssh默认端口该怎么操作呢?

我们都知道服务器 SSH 默认连接端口为 22,有时候出于安全方面的考虑需要修改默认的连接端口。

下面就介绍一下修改 SSH 端口的方法:

步骤1:编辑ssh配置文件

vi /etc/ssh/sshd_config

查找到如下字段:

# 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 22 
#ListenAddress 0.0.0.0 
#ListenAddress ::

把其中的Port 22修改为:

Port 123

步骤2:重启SSH服务

service sshd restart

OK,大功告成!


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

High Performance Python

High Performance Python

Andrew Lewis / O'Reilly Media, Inc. / 2010-09-15 / USD 34.99

Chapter 1. Introduction Section 1.1. The High Performance Buzz-word Chapter 2. The Theory of Computation Section 2.1. Introduction Section 2.2. Problems Section 2.3. Models of Computati......一起来看看 《High Performance Python》 这本书的介绍吧!

SHA 加密
SHA 加密

SHA 加密工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具