Skip to main content

Control downloading/uploading publickeys.

Project description

# 機能概要

* YAMLに設定したユーザーの公開鍵をGithubからダウンロード
* YAMLに設定したホストにauthrized_keysファイルを配置
* YAMLの設定から~/.ssh/config 用ファイルを生成

## YAMLの例

sample.yml:
```
group:
- &developers
- oyakata # Yakata Imagawa
- feiz # Kenta Azuma
- &superusers
- oyakata # Yakata Imagawa


development.example.com:
title: 開発環境
hostname: 127.0.0.1
members: *developers
tags: development


example.com:
title: 本番環境
hostname: 127.0.0.1
members: *superusers
tags: production
```

### ~/.ssh/config を生成

$ publickey config sample.yml -t production > ssh_config

生成された ssh_config:
```
Host example.com
# 本番環境
HostName 127.0.0.1
Port 22
User ubuntu
IdentityFile ~/.ssh/id_rsa

ServerAliveInterval 120
```

### Githubの公開鍵を一括取得

$ publickey get sample.yml development.example.com > authorized_keys # oyakata, feizの鍵
$ publickey get sample.yml example.com > authorized_keys # oyakataの鍵のみ


### ファイルをホストに配置

$ publickey put -s authorized_keys example.com # ファイルを指定してput
$ publickey put -e sample.yml example.com # Githubの鍵をダウンロードしてput


2015-02-08:
* change 'put' operation.
* retry with password authentication when publickey authentication failed.
2014-10-24: version '0.1'
* support 'get/put' operation.
2014-10-24: version '0.2'
* support 'config' operation(generate ~/.ssh/config from yaml).
2014-10-31: version '0.2.2'
* support 'echo' operation(trying to connect remote host).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

publickey-0.3.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distribution

publickey-0.3-py2.7.egg (10.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page