centos 7 : systemctl stop sshd
ubuntu: systemctl stop ssh
希望可以帮助你 请采纳
chkconfig --level 2345 sshd on --level 指定系统在2345运行级别时,通常在35中开启就行,开启(on)sshd服务,关闭则用(off) 临时控制启动停止则用:/etc/rc.d/init.d/sshd start | stop | restart默认情况下,外网不能访问内网的任何资源。如果开放了外网访问内网,想要关闭SSH服务,就需要些策略。命令如下:
SSG系列防火墙:
set address trust fwq_address 192.168.X.X/32
set policy top from untrust to trust any fwq_address ssh deny
SRX系列防火墙:
set security zones security-zone trust address-book address fwq_address 192.168.X.X/32
Set security policies from-zone untrust to-zone trust policy 001 match source-address any destination-address fwq_address application junos-ssh
set security policies from-zone trust to-zone untrust policy 001 then deny
//*fwq_address是自己定义一个地址名字,192.168.X.X/32是服务器地址
欢迎分享,转载请注明来源:夏雨云
评论列表(0条)