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

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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Egg

File details

Details for the file publickey-0.3.tar.gz.

File metadata

  • Download URL: publickey-0.3.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for publickey-0.3.tar.gz
Algorithm Hash digest
SHA256 09de569be021d7ed2c0361ee81554775c57afda8760781d26d3d502882b92304
MD5 13d52e090d64e4b9d5c93a37d12fc1d5
BLAKE2b-256 9dd39d10d229b03c189b76f194e35b2767c423a0226106f338b131d3626c93bc

See more details on using hashes here.

File details

Details for the file publickey-0.3-py2.7.egg.

File metadata

  • Download URL: publickey-0.3-py2.7.egg
  • Upload date:
  • Size: 10.9 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for publickey-0.3-py2.7.egg
Algorithm Hash digest
SHA256 d9a2825aaf9926f7505cb3f5c822b7b85e37c5a6046b27c1f6373e8e206e7bbb
MD5 6d363c2094fcc5ea0d3a7c778aec3fa8
BLAKE2b-256 5de26b28f0094860d656b5086af57b6247844278e8829d7f07408fd239a7169b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3 This release

2 files

0.2.2

2 files

0.2.1

2 files

0.2

2 files

0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page