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

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

内容简介:我们都知道服务器 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,大功告成!


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

查看所有标签

猜你喜欢:

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

Beginning iPhone and iPad Web Apps

Beginning iPhone and iPad Web Apps

Chris Apers、Daniel Paterson / Apress / 2010-12-15 / USD 39.99

It seems that everyone and her sister has developed an iPhone App—everyone except you, the hard-working web professional. And now with the introduction of the iPad, you may even feel farther behind. B......一起来看看 《Beginning iPhone and iPad Web Apps》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

随机密码生成器
随机密码生成器

多种字符组合密码