温馨提示×

Debian系统中如何禁用Telnet服务

小樊
36
2025-03-16 18:29:39
栏目: 智能运维
Debian服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

在Debian系统中,要禁用Telnet服务,请按照以下步骤操作:

  1. 打开终端。

  2. 输入以下命令以停止Telnet服务:

sudo systemctl stop telnet.socket
  1. 禁用Telnet服务,以防止它在系统启动时自动运行:
sudo systemctl disable telnet.socket
  1. (可选)如果您还希望阻止远程用户通过Telnet访问您的系统,您可以编辑/etc/hosts.deny文件,添加以下内容:
ALL: telnetd
  1. (可选)如果您想允许特定IP地址访问Telnet服务,可以编辑/etc/hosts.allow文件,添加以下内容(将your_ip_address替换为您允许访问的IP地址):
telnetd: your_ip_address
  1. 最后,重启系统以确保更改生效:
sudo reboot

现在,Telnet服务已在您的Debian系统中被禁用。

亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

推荐阅读:Debian系统中Telnet为何被禁用

0