修改服务器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,大功告成!


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

查看所有标签

猜你喜欢:

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

Building Websites with Joomla!

Building Websites with Joomla!

H Graf / Packt Publishing / 2006-01-20 / USD 44.99

This book is a fast paced tutorial to creating a website using Joomla!. If you've never used Joomla!, or even any web content management system before, then this book will walk you through each step i......一起来看看 《Building Websites with Joomla!》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

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

多种字符组合密码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码