跳转到主要内容

Public Key Manager旨在生成authorized_keys文件并将其分发到指定的服务器。

项目描述

描述

此程序可用于管理多台服务器上的公钥。在配置文件中指定哪些用户及其公钥有权限使用特定用户名登录到哪些服务器。

Publickeymanager对于您有多个用户登录到多台服务器上的共享账户非常有用。

配置文件

配置文件有以下选项

[keys]
  Specify one public key per user.

[group:`users`]
  Use this if you want to bundle multiple users to one group. Say for example
  a sysadmin group.

[group:`name`]
  Specify a group of servers. `name` is the name of the group.
  A config file can hold multiple [group:`name`]
  directives.

组[cite>name]的选项

组的选项

user_groups
  A reference to groups defined in [group:`users`].
  All users in the group have
  access to the servers in this group.

access
  Which individual users have access to servers in this group.

servers
  A list of servers which belong to this group.

[server:`name`]
  Specify a server. A config file can hold multiple [server:`name`]
  directives.
  The name is the name of the server. A name can be referenced in a server
  group.

服务器[cite>name]的选项

服务器的选项

hostname
  The hostname of the server.

user
  The username that is used to login to the server.

groups
  Define which groups have access to this server. Groups need to exist in
  [group:`name`]

access
  Define which users have access to this server.
  Users need have a key file mentioned in [keys].

示例配置文件

一个示例配置文件,展示了所有选项

[keys]
roland=rvanlaar.pub
example_user=example.pub
example_user2=example2.pub

[group:users]
sysadmin =
  roland

[group:remote]
user_groups =
  sysadmin
access =
  example_user1
servers =
  example_server1
  example_server2

[server:localhost]
hostname = 127.0.0.1
user = roland
groups = sysadmin
access = example

[server:example_server1]
hostname = example.com
user = example

[server:example_server2]
hostname = example.org
user = example

更改

0.3

  • 新授权的keys文件将具有与旧文件相同的权限。

0.2.4

  • 添加了检查。服务器至少需要有一个将能访问它的用户。

0.2.3

  • 添加了time.sleep(1);这是通过shell.send正确移动所必需的。

  • 修复了group:users的解析错误。

0.2.2

  • 修复了group:users的解析错误。

  • [group:user]重命名为[group:users]。

0.2.1

  • 删除了旧的pdb行。

0.2

  • 修复了损坏的函数parse_config。

  • 将更改和Readme添加到长描述中。

0.1.2

  • 可以使用-d选择公钥目录。

  • 添加了更多解释性错误消息。

0.1.1

  • 修复了egg安装。

0.1

  • 将第一个版本发布到pypi。

由以下机构支持