内容简介:我们都知道服务器 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,大功告成!
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Design systems
Not all design systems are equally effective. Some can generate coherent user experiences, others produce confusing patchwork designs. Some inspire teams to contribute to them, others are neglected. S......一起来看看 《Design systems》 这本书的介绍吧!