Skip to content

Commit

Permalink
1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-yurchenko committed Jun 2, 2021
1 parent 86b9dd4 commit e8d83ad
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 60 deletions.
20 changes: 15 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
## [1.0.3](https://github.com/ReasonSoftware/ssh-manager/releases/tag/v1.0.3) - 2021-05-01
## [1.0.4] - 2021-06-02
## Changed
- Updated dependencies

## [1.0.2](https://github.com/ReasonSoftware/ssh-manager/releases/tag/v1.0.2) - 2021-04-26
## [1.0.3] - 2021-05-01
## Changed
- Updated dependencies

## [1.0.1](https://github.com/ReasonSoftware/ssh-manager/releases/tag/v1.0.1) - 2021-03-04
## [1.0.2] - 2021-04-26
## Changed
- Updated dependencies

## [1.0.1] - 2021-03-04
## Fixed
- Logged application version

## Changed
- Update users public key log message
- Updated dependencies

## [1.0.0](https://github.com/ReasonSoftware/ssh-manager/releases/tag/v1.0.0) - 2021-02-10
- First release
## [1.0.0] - 2021-02-10
- First release

[1.0.4]: https://github.com/ReasonSoftware/ssh-manager/compare/v1.0.3...v1.0.4
[1.0.3]: https://github.com/ReasonSoftware/ssh-manager/compare/v1.0.2...v1.0.3
[1.0.2]: https://github.com/ReasonSoftware/ssh-manager/compare/v1.0.1...v1.0.2
[1.0.1]: https://github.com/ReasonSoftware/ssh-manager/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/ReasonSoftware/ssh-manager/releases/tag/v1.0.0
102 changes: 51 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

- Prepare [Central Configuration](#central-configuration) once
- Add new servers by:
- Complete [Server Configuration](#server-configuration)
- [Install](#installation) the service
- Complete [Server Configuration](#server-configuration)
- [Install](#installation) the service

*It is strongly recommended updating the service once in a while*

Expand Down Expand Up @@ -102,17 +102,17 @@

1. Create a local configuration file `/root/ssh-manager.yml`

```yaml
secret_name: ssh-manager
region: us-west-1
groups:
- devops
- poc
```
```yaml
secret_name: ssh-manager
region: us-west-1
groups:
- devops
- poc
```
- `secret_name` (required) - AWS Secret name with a central configuration
- `region` - AWS region where a Secret is stored. Default **us-east-1**
- `groups` (required) - a list of server group names from a central configuration
- `secret_name` (required) - AWS Secret name with a central configuration
- `region` - AWS region where a Secret is stored. Default **us-east-1**
- `groups` (required) - a list of server group names from a central configuration

2. Create and attach an IAM Roles or configure an IAM User to allow EC2's to fetch the secret.
- If using User Authentication, configure the credentials for root user.
Expand All @@ -128,39 +128,39 @@ groups:
- Download latest [release](https://github.com/ReasonSoftware/ssh-manager/releases/latest) unzip to `/var/lib/ssh-manager`
- Create **systemd** service under `/etc/systemd/system/ssh-manager.service` with the following content:

```
[Unit]
Description=Central SSH Management Service for AWS Linux EC2
Wants=network-online.target
After=network-online.target
[Service]
Type=oneshot
ExecStart=/var/lib/ssh-manager/ssh-manager
StandardOutput=journal
User=root
[Install]
WantedBy=multi-user.target
```
```
[Unit]
Description=Central SSH Management Service for AWS Linux EC2
Wants=network-online.target
After=network-online.target
[Service]
Type=oneshot
ExecStart=/var/lib/ssh-manager/ssh-manager
StandardOutput=journal
User=root
[Install]
WantedBy=multi-user.target
```

- Create **systemd** timer under `/etc/systemd/system/ssh-manager.timer` with the following content:

```
[Unit]
Description=Timer for Central SSH Management Service
Wants=network-online.target
After=network-online.target
[Timer]
Unit=ssh-manager.service
OnBootSec=10min
OnUnitInactiveSec=60min
Persistent=true
[Install]
WantedBy=multi-user.target
```
```
[Unit]
Description=Timer for Central SSH Management Service
Wants=network-online.target
After=network-online.target
[Timer]
Unit=ssh-manager.service
OnBootSec=10min
OnUnitInactiveSec=60min
Persistent=true
[Install]
WantedBy=multi-user.target
```

- Reload **systemd** configuration: `systemctl daemon-reload`
- Enable **ssh-manager** service: `systemctl enable ssh-manager.service`
Expand All @@ -180,18 +180,18 @@ Decide what are you going to do with the users and either delete them (`userdel

- Delete systemd service and timer:

```shell
systemctl stop ssh-manager.service
systemctl stop ssh-manager.timer
rm -f /etc/systemd/system/ssh-manager.*
```
```shell
systemctl stop ssh-manager.service
systemctl stop ssh-manager.timer
rm -f /etc/systemd/system/ssh-manager.*
```

- Delete application groups:

```shell
groupdel ssh-manager-users
groupdel ssh-manager-sudoers
```
```shell
groupdel ssh-manager-users
groupdel ssh-manager-sudoers
```

- Remove `%ssh-manager-sudoers ALL=(ALL) NOPASSWD: ALL` entry from `/etc/sudoers` file
- Delete app directory `rm -rf /var/lib/ssh-manager`
Expand Down
3 changes: 3 additions & 0 deletions internal/app/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import (
"github.com/pkg/errors"
)

// Version contains current application version
const Version string = "1.0.4"

// Config represents a remote configuration
type Config struct {
Users map[string]string `json:"users"`
Expand Down
4 changes: 0 additions & 4 deletions internal/app/version.go

This file was deleted.

0 comments on commit e8d83ad

Please sign in to comment.