Skip to main content
# 機能概要

* 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).

Metadata

Release files for publickey 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for publickey 0.3
File Size Uploaded
publickey-0.3.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for publickey 0.3
File Interpreter ABI Platform
publickey-0.3-py2.7.egg Legacy Egg format - - Details

Total release size: 15.8 kB

Release files / publickey-0.3.tar.gz

Download URL publickey-0.3.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
09de569be021d7ed2c0361ee81554775c57afda8760781d26d3d502882b92304
BLAKE2b-256 checksum
How to use checksums
9dd39d10d229b03c189b76f194e35b2767c423a0226106f338b131d3626c93bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / publickey-0.3-py2.7.egg

Download URL publickey-0.3-py2.7.egg
Size 10.9 kB
Tags Egg
SHA-256 checksum
How to use checksums
d9a2825aaf9926f7505cb3f5c822b7b85e37c5a6046b27c1f6373e8e206e7bbb
BLAKE2b-256 checksum
How to use checksums
5de26b28f0094860d656b5086af57b6247844278e8829d7f07408fd239a7169b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page