ssh信息泄露了怎么办

技术文档

ssh信息泄露了怎么办

2026-03-12 21:20







ssh信息泄露导致服务器不安全怎么办?

1、vi /etc/ssh/ssh_config

#添加两个远程端口,是为了防止修改出错导致 22 也登不上就麻烦了

Port 22

Port 8094

保存

2、vi /etc/ssh/sshd_config 

Port 22

Port 8094

保存

3、iptables -I INPUT -p tcp --dport 8094 -j ACCEPT

防火墙上开端口 

service iptables save

service sshd restart

service iptables restart