SSH是什么?Linux如何修改SSH端口号
1个回答
展开全部
Linux下修改端口号只需要更改相应服务的配置文件即可,下面以修改销迅做linux 的SSH服务的默认端口号22为例(把22修改我2501):
1、修改/etc/ssh/sshd_config配置文亏衡件
[root@localhost ssh]# more sshd_config
# $OpenBSD: sshd_config,v 1.69 2004/05/23 23:59:53 dtucker Exp $
# 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:/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 change a
# default value.
#Port 22 //先把22注释掉
port 2501 //添加一个新的端口
#Protocol 2,1
2、重启ssh服务让修改的昌野端口号生效
[root@localhost ~]# service sshd restart
Stopping sshd:[ OK ]
Starting sshd:[ OK ]
1、修改/etc/ssh/sshd_config配置文亏衡件
[root@localhost ssh]# more sshd_config
# $OpenBSD: sshd_config,v 1.69 2004/05/23 23:59:53 dtucker Exp $
# 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:/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 change a
# default value.
#Port 22 //先把22注释掉
port 2501 //添加一个新的端口
#Protocol 2,1
2、重启ssh服务让修改的昌野端口号生效
[root@localhost ~]# service sshd restart
Stopping sshd:[ OK ]
Starting sshd:[ OK ]
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询