标签 Debian 下的文章

Debian 12 修改 SSH 登录端口和密码

修改默认的登录端口输入命令:vim /etc/ssh/sshd_config 将默认的 Port 22 修改为指定端口,并去掉前面的 # 号注释即可。例如将端口修改为 12345:Port 12345 然后 ESC + :wq 退出编辑并保存。如果你开启了防火墙,还需要修改防火墙规则里面对应的端口。最后重启 sshd 服务:systemctl restart sshd...

Debian12 下禁用 ipv6

编辑 /etc/sysctl.conf,添加或者编辑以下变量:net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 net.ipv6.conf.eth0.disable_ipv6 = 1 最后运行 sysct...