如何安装 libconfig-model-openssh-perl Ubuntu 18.04

在本教程中,我们学习如何安装 libconfig-model-openssh-perl Ubuntu 18.04。 libconfig-model-openssh-perl 是 OpenSsh 的配置编辑器

介绍

在本教程中我们学习如何安装 libconfig-model-openssh-perl 在 Ubuntu 18.04。

什么是 libconfig-model-openssh-perl

libconfig-model-openssh-perl 是:

Config::Model::OpenSsh 使 cme 命令能够编辑 OpenSSH 配置文件,即 /etc/ssh/sshd_config、/etc/ssh/ssh_config (对于 root 用户)和 ~/.ssh/config (对于其他用户)。

您可以通过安装一些可选的依赖项来获得额外的功能:

  • 使用 libconfig-model-tkui-perl 的图形 OpenSSH 文件编辑器
  • 使用 libconfig-model-cursesui-perl 的curses OpenSSH 文件编辑器

文件的注释在编辑过程中会被保留。 可以使用图形界面编辑注释并将其保存回配置文件中。

“cme check ssh”命令可用于验证 ssh* 配置文件的内容。

有三种安装方法 libconfig-model-openssh-perl 在 Ubuntu 18.04。 我们可以用 apt-get, aptaptitude。 在以下部分中,我们将描述每种方法。 您可以选择其中之一。

使用 apt-get 安装 libconfig-model-openssh-perl

更新 apt 数据库 apt-get 使用以下命令。

更新apt数据库后,我们可以安装 libconfig-model-openssh-perl 使用 apt-get 通过运行以下命令:

sudo apt-get -y install libconfig-model-openssh-perl

使用 apt 安装 libconfig-model-openssh-perl

更新 apt 数据库 apt 使用以下命令。

更新apt数据库后,我们可以安装 libconfig-model-openssh-perl 使用 apt 通过运行以下命令:

sudo apt -y install libconfig-model-openssh-perl

使用 aptitude 安装 libconfig-model-openssh-perl

如果您想遵循此方法,您可能需要先安装 aptitude,因为 aptitude 通常不会默认安装 Ubuntu。 更新 apt 数据库 aptitude 使用以下命令。

更新apt数据库后,我们可以安装 libconfig-model-openssh-perl 使用 aptitude 通过运行以下命令:

sudo aptitude -y install libconfig-model-openssh-perl

如何卸载 libconfig-model-openssh-perl Ubuntu 18.04

仅卸载 libconfig-model-openssh-perl 打包我们可以使用以下命令:

sudo apt-get remove libconfig-model-openssh-perl

卸载 libconfig-model-openssh-perl 及其依赖项

卸载 libconfig-model-openssh-perl 及其不再需要的依赖项 Ubuntu 18.04,我们可以使用以下命令:

sudo apt-get -y autoremove libconfig-model-openssh-perl

删除 libconfig-model-openssh-perl 配置和数据

去除 libconfig-model-openssh-perl 配置和数据来自 Ubuntu 18.04我们可以使用以下命令:

sudo apt-get -y purge libconfig-model-openssh-perl

删除 libconfig-model-openssh-perl 配置、数据及其所有依赖项

我们可以使用下面的命令来删除 libconfig-model-openssh-perl 配置、数据及其所有依赖项,我们可以使用以下命令:

sudo apt-get -y autoremove --purge libconfig-model-openssh-perl

参考

概括

在本教程中我们学习如何安装 libconfig-model-openssh-perl 封装在 Ubuntu 18.04 使用不同的包管理工具: apt, apt-getaptitude