SSH是什么?Linux如何修改SSH端口号
答案:2 悬赏:70
解决时间 2021-02-19 01:45
- 提问者网友:浪子生来ˇ性放荡²↘
- 2021-02-18 05:01
SSH是什么?Linux如何修改SSH端口号
最佳答案
- 二级知识专家网友:我叫很个性
- 2021-02-18 05:20
ssh 和telnet 差不多, 都是远程登录的客户端, 只不过ssh更安全(加密方式), telnet是明文传输.ssh IP地址ssh 域名具体可以查看man ssh或者ssh --help查看一下
就是修改/etc/ssh/sshd_config //注意,容易和ssh_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
步骤二
[root@localhost ~]# service sshd restart
Stopping sshd:[ OK ]
Starting sshd:[ OK ]
步骤三
用SecureCRT测试一下
就是修改/etc/ssh/sshd_config //注意,容易和ssh_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
步骤二
[root@localhost ~]# service sshd restart
Stopping sshd:[ OK ]
Starting sshd:[ OK ]
步骤三
用SecureCRT测试一下
全部回答
- 1楼网友:随心随缘不随便
- 2021-02-18 05:59
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服务让修改的端口号生效
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯
• 手机登qq时,显示手机磁盘不足,清理后重新登 |
• 刺客的套装怎么选啊? |