https://github.com/toshimaru/mitamae-plugin-recipe-ssh_users
SSH user setup for mitamae.
https://github.com/toshimaru/mitamae-plugin-recipe-ssh_users
Last synced: about 1 year ago
JSON representation
SSH user setup for mitamae.
- Host: GitHub
- URL: https://github.com/toshimaru/mitamae-plugin-recipe-ssh_users
- Owner: toshimaru
- License: mit
- Created: 2016-11-23T17:25:45.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-11T19:39:25.000Z (over 9 years ago)
- Last Synced: 2024-04-14T18:22:24.733Z (about 2 years ago)
- Language: Ruby
- Size: 2.93 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mitamae-plugin-recipe-ssh_users
Mitamae plugin which configures users and ssh_keys.
## Installation
```bash
$ mkdir plugins
$ git clone --depth 1 https://github.com/toshimaru/mitamae-plugin-recipe-ssh_users plugins/mitamae-plugin-recipe-ssh_users
```
## Usage
### Recipe
`recipe.rb`:
```rb
include_recipe 'ssh_users'
```
### Node Sample
`node.yml`:
```yaml
ssh_users:
- username: "toshimaru"
uid: 2000
authorized_keys: |
ssh-ed25519 YOUR_PUBLIC_AUTHORIZED_KEYS
- username: "foo"
password: "1234"
gid: 1001
uid: 2001
authorized_keys: "PUBLIC_AUTHORIZED_KEY"
- username: "bar"
```
### Apply mitamae recipe
```
$ mitamae local recipe.rb -y node.yml
```
## Tips
### How to generate password for user
```
$ gem install unix-crypt
$ mkunixcrypt -s "salt"
Enter password:
Verify password:
$6$salt$...
```
## TODO
- apply shell configuration
- more README