如何在 CentOS 8 上安装 Telnet

在本教程中,我们将向您展示如何在 CentOS 8 上安装 Telnet。对于那些不知道的人,Telnet 是提供双向交互式文本通信的应用层协议。 它在服务器/客户端模式下工作,其中 Telnet 服务器应用程序安装在主计算机中,所有其他计算机使用 Telnet 客户端应用程序与其连接。 默认情况下,telnet 不会安装在您的系统中。

本文假设您至少具备 Linux 的基本知识,知道如何使用 shell,最重要的是,您将网站托管在自己的 VPS 上。 安装非常简单,假设您在 root 帐户下运行,如果不是,您可能需要添加 ‘sudo‘ 到命令以获取 root 权限。 我将向您展示如何在 CentOS 8 上逐步安装 Telnet。

在 CentOS 8 上安装 Telnet

第 1 步。首先,让我们首先确保您的系统是最新的。

sudo dnf update sudo dnf install epel-release

步骤 2. 在 CentOS 8 上安装 Telnet。

现在我们运行以下命令在 CentOS 系统上安装 telnet:

sudo dnf install telnet

步骤 3. 配置 Firewalld。

Telnet 通过端口 23 进行通信,需要在内置的 firewalld 中允许:

sudo firewall-cmd –add-service=telnet –zone=public sudo firewall-cmd –add-service=telnet –zone=public — permanent

步骤 4. 使用 Telnet。

现在,您可以运行 telnet:

[[email protected] ~]# telnet telnet>

现在你可以使用 telnet 命令来测试与远程服务器的端口连接性。 在下面的示例中,我们使用 telnet 通过运行检查 google.com 端口 443 连接的命令 telnet google.com 443 命令:

[[email protected] ~]# telnet google.com 443 Trying 74.125.68.113... Connected to google.com.

恭喜! 您已成功安装 Telnet。 感谢您使用本教程在您的 CentOS 8 系统上安装 Telnet。 如需更多帮助或有用信息,我们建议您查看 CentOS 官方网站.