修改linux debian10 ssh默认22端口为自定义安全端口
连上SSH后,我们修改访问端口的文件为 /etc/ssh/sshd_config
找到#Port 22这一段,把#号去掉即可,在这一段下面新加一段,Port 3088
root@:~# vi /etc/ssh/sshd_config
# $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# 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 override the
# default value.
Port 22
Port 3088
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
:wq 保存
wq保存后,重启SSH服务
如果无法访问,centos需要关闭iptables,debian忽略这里
版权声明:
作者:ivpsr.com
链接:https://ivpsr.com/240.html
文章版权归作者所有,未经允许请勿转载。
THE END

1

分享

二维码
发表评论
您需要登录后评论
赶快来坐沙发