Skip to content

Commit c6ed7af

Browse files
updated docs
1 parent 020457f commit c6ed7af

File tree

8 files changed

+36
-29
lines changed

8 files changed

+36
-29
lines changed

.github/workflows/dingseboms.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ on:
99
workflow_dispatch:
1010

1111
jobs:
12-
run-keys-script:
13-
name: Update
12+
update:
1413
uses: ./.github/workflows/update-keys.yml
1514
with:
1615
environment: dingseboms

.github/workflows/duppeditt.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ on:
99
workflow_dispatch:
1010

1111
jobs:
12-
run-keys-script:
13-
name: Update
12+
update:
1413
uses: ./.github/workflows/update-keys.yml
1514
with:
1615
environment: duppeditt

.github/workflows/gluteus.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ on:
99
workflow_dispatch:
1010

1111
jobs:
12-
run-keys-script:
13-
name: Update
12+
update:
1413
uses: ./.github/workflows/update-keys.yml
1514
with:
1615
environment: gluteus

.github/workflows/meieri.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ on:
99
workflow_dispatch:
1010

1111
jobs:
12-
run-keys-script:
13-
name: Update
12+
update:
1413
uses: ./.github/workflows/update-keys.yml
1514
with:
1615
environment: meieri

.github/workflows/noodlebar.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ on:
99
workflow_dispatch:
1010

1111
jobs:
12-
run-keys-script:
13-
name: Update
12+
update:
1413
uses: ./.github/workflows/update-keys.yml
1514
with:
1615
environment: noodlebar

.github/workflows/phoenix.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ on:
99
workflow_dispatch:
1010

1111
jobs:
12-
run-keys-script:
13-
name: Update
12+
update:
1413
uses: ./.github/workflows/update-keys.yml
1514
with:
1615
environment: phoenix

CODEOWNERS

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
# This file defines the DevOps teams as code owners for all files
2-
# Reviews from code owners are mandatory to merge pull requests to this repository
3-
# Essentially, this means DevOps and the organization leaders are the only ones who can manage authorized SSH keys on the servers
4-
* @hackerspace-ntnu/DevOps
1+
* @hackerspace-ntnu/devops-ledelsen

README.md

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,47 @@
11
# ssh-keys
2-
Public SSH keys for DevOps members
32

4-
The `authorized_keys` files on Hackerspace servers are automatically populated with the SSH keys in this repository.
3+
Public SSH keys for the Hackerspace servers
4+
5+
The `authorized_keys` files on Hackerspace servers are automatically populated with the SSH keys in this repository on a per server basis.
56

67
## Adding a new key
78

8-
Adding a new key will grant the key owner server access.
9+
Adding a new key will grant the key owner server access. Only add a key to the servers you need access to.
10+
11+
For services like deployment etc. it is important to add a new key specific for the service instead of reusing an existing one.
12+
13+
1. Generate a new SSH key using `ssh-keygen`.
14+
15+
```bash
16+
ssh-keygen -t ed25519 -C "your@email.com"
17+
```
18+
19+
- Use `ed25519` as the key type. It is more modern than `rsa`.
20+
- For the comment, include a way to contact you, phone number or email (This is not necessary for keys used for services, then a comment with the service name is enough).
921

10-
1. Generate a new SSH key using your generator of choice (typically PuTTYgen or ssh-keygen)
11-
- If using PuTTYgen, ensure you export the keyfiles with the OpenSSH format
12-
2. Create a new branch, commit and push your **public** key file in the `keys` folder
22+
2. Create a new branch, commit and push your **public** key file in the appropriate directory for the server inside the `keys` directory.
1323

1424
Typically, a public key file looks something like the following:
25+
1526
```
16-
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCuS3I1pwSSUtT6NqeKxa33vwXHQy0f7xlyZHq5dlB3UYJNamDR0KEs/fhxjyCJ8XLf7nJNvojJ5qAtxEJjpnVonM6ehHi3juHxgMJOGIZHcWJ72BpjdcWZk0LuOx0x1qTdHFlU+6aTl27dSgVB+2QQESwQTtVgbIGiNcdt3ES9+Yhc8Sk0PrZ2TW5cTdZJlv/kb/cKgFIk8UQqu5h7TJHyq+L6kbEZrlhB2YmJ1ZICaN2YYsHKvtX5ibkJB4RpAOwOiUHVlDzrlBzjdIKxseCt5oEIANObmdk9YOXfMeAQNJDa3Hx3j5yXuMaJCPFqdwxfzeSOJ+OFGSS5q9FG1Dr/
27+
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINvlUIQHvVRV0D+BY51Fzf2Q/r0wxMA9JPAPFk1iQTQv hackerspace-dev@idi.ntnu.no
1728
```
18-
If you see the word `PRIVATE` anywhere in the file(s) you are commiting, **stop immediately**. Private keys are like passwords should be treated as highly confidential.
1929

20-
1. Open a pull request and have someone review the addition of your key
21-
2. Merge your key in
30+
If you see the word `PRIVATE` anywhere in the file(s) you are commiting, **stop immediately**. Private keys are like passwords and should be treated as highly confidential.
31+
32+
3. Open a pull request and have the DevOps leadership review the addition
2233

23-
After your key is merged in, you should get SSH access to the Hackerspace servers soon(tm).
34+
After your key is merged in, you should get SSH access to the respective server within a few minutes.
35+
36+
> [!NOTE]
37+
> If you are new to SSH, there is a private guide in the DevOps server documentation on GitHub.
2438
2539
## Removing a key
2640

27-
SSH keys should be removed from the repository as soon as they are no longer in use. This *especially* applies to retired DevOps members.
41+
SSH keys should be removed from the repository as soon as they are no longer in use. This _especially_ applies to retired DevOps members.
42+
43+
So when a member leaves the Hackerspace, their keys should be removed.
2844

2945
1. Create a new branch, commit and push the removal of the appropriate key file
30-
2. Open a pull request and have someone review the removal
46+
2. Open a pull request and wait for review
3147
3. Merge the key removal

0 commit comments

Comments
 (0)