Titan-适用于Linux的命令行密码管理器

时间:2020-03-21 11:48:25  来源:igfitidea点击:

Titan是使用C编程语言编写的。
它使用SQlite保存密码,所有密码将使用AES加密存储。
Titan使用openSSL库执行加密。
通过使用键哈希消息认证代码(HMAC),还可以保护密码数据库不被篡改。
泰坦不仅仅是一个密码管理器。
从1.2版开始,Titan还支持加密文件和目录。

在此教程中,让我们看看如何安装和使用Titan命令行密码管理器。

安装

以下说明在Ubuntu 16.04 LTS服务器版本下进行了测试。

首先,如果尚未安装SQlite,openSSL和Git,请安装它们:

$sudo apt-get install libsqlite3-dev libssl-dev git

Git克隆Titan仓库:

$git clone https://github.com/nrosvall/titan.git

上面的命令会将Titan储存库克隆到当前工作目录中名为titan的目录中。

$cd titan

然后,使用以下命令编译并安装Titan:

$make
$sudo make install

泰坦用法

Titan的使用是相当直接的。
使用Titan的典型命令是:

$titan [flags] [options]

首先,使用以下命令初始化新数据库:

$titan -i mypasswords

其中mypasswords是数据库名称。
该数据库将在当前目录中创建。

要显示数据库路径,只需运行:

$titan -s

如果我们有多个数据库,则可以通过运行以下命令在它们之间进行切换:

$titan -u <database_path>

现在,我们可以开始添加条目。

要在Titan中添加新条目,请运行:

$titan -a

逐一填写值。

Title: MySQL root password
Username: root
Url: theitroad.com
Notes: Database administrator password
Password (empty to generate new):

我们可以使用以下命令随时查看所有条目:

$titan -A

我们将看到类似下面的输出。

=====================================================================
ID: 1
Title: MySQL root password
User: root
Url: theitroad.com
Password: **
Notes: Database administrator password
Modified: 2016-03-20 15:45:10
=====================================================================

要列出特定条目,请使用ID名称如下的-l选项。

$titan -l 1

要搜索条目,请使用-f选项。
例如,以下命令将搜索有关MySQL的条目。

$titan -f mysql

要编辑任何条目,我们需要使用ID名称如下的-c选项。

$titan -c 1

上面的命令将允许我们编辑ID号为1的条目。
它将在编辑每个ID之前列出每个ID的当前详细信息。

Current title MySQL root password
New title: MySQL password
Current username root
New username: sk
Current url theitroad.com
New url: theitroad.com
Current notes Database administrator password
New note: Database user password
Current password ubuntu
New password (empty to generate new):

要删除条目,请运行:

$titan -r <ID_NAME>

要加密当前数据库,请运行:

$titan -e

同样,要解密数据库,请使用-d选项。

$titan -d <database_path>

要生成密码,请使用-g选项和密码长度。
例如,要生成一个包含10个字母的密码,请运行:

$titan -g 10

要查看所有密码,请运行:

$titan --show-passwords -A

要在退出后自动加密:

$titan --auto-encrypt

要加密目录中的文件:

$titan --encrypt-directory /home/sk/Documents/

要打开帮助部分,请运行:

$titan --help

另外,请参考手册页。

$man titan