You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+75-9Lines changed: 75 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,17 @@
2
2
3
3
A simple to use and deploy SSH CA server.
4
4
5
-
**This is a Work In Progress** - the project is in its early days. It is functional and I'm using it for my own hosts **but** you use it at your own risk
5
+
**This is a Work In Progress** - the project is in its early days. It is functional, and I'm using it for my own hosts, **but** you use it at your own risk
6
+
7
+
## Goals
8
+
9
+
There are a couple of SSH CA servers out there - I have found them all difficult to use and have specific platform
10
+
requirements. This projects aims to:
11
+
12
+
- Be simple to use and deploy
13
+
- Use sensible secure defaults
14
+
15
+
I'm also using this project to learn go, so if you come across it and notice something dumb please let me know by opening an issue!
6
16
7
17
## Installation
8
18
@@ -17,12 +27,14 @@ mkdir /opt/sentinel
17
27
# Copy archive into directory
18
28
tar xvzf ssh-sentinel-server_$VERSION_$ARCH.tar.gz
**The key must not have a password** - this will be improved in a future release
63
+
64
+
### Adding users
65
+
66
+
Once you have the service installed you'll need to add some users. I hope to improve this process later but for now you can do it via the `admin` command
67
+
68
+
```shell
69
+
./ssh-sentinel-server admin -h
70
+
Create / delete users
71
+
72
+
Usage:
73
+
ssh-sentinel-server admin [flags]
74
+
75
+
Flags:
76
+
-c, --config string Config file
77
+
-C, --create If set a new user will be created
78
+
-h, --help helpfor admin
79
+
-n, --name string User's name
80
+
-P, --principals strings A list of principals for the user
81
+
-U, --username string Username
82
+
```
83
+
84
+
So to add a user
85
+
86
+
```shell
87
+
./ssh-sentinel-server admin -c config.json -C -n test -P test1 test2 -U test
88
+
```
89
+
90
+
Not that the username is the user associated with this service. The principals list the allowed usernames on the server you will ssh to.
91
+
92
+
## Usage
93
+
94
+
Here are some high level usage details
95
+
96
+
### Clients
97
+
98
+
The server stands up as a restful HTTP/S service. You can post requests via curl ( see [api docs](./api-docs.yaml) for the API ) or you can use the [CLI client](https://github.com/ST2Projects/ssh-sentinel-client)
99
+
100
+
### Servers
101
+
102
+
Servers require some configuration to use the CA. In short:
103
+
104
+
- Copy the CA **public key** to the server and save it in `/etc/ssh/ca.pub`
105
+
- Edit `/etc/ssh/sshd_config` and add `TrustedUserCAKeys /etc/ssh/ca.pub`
106
+
- Restart SSHD `service sshd restart`
107
+
108
+
The easiest way to do this across an estate is with ansible. I will publish a role on ansible-galaxy to do this but you can create your own if required / desired
0 commit comments