Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kebab-case settings as the default #26

Merged
merged 1 commit into from
Apr 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ To use custom public keys for `.ssh/authorized_keys` and/or custom CA keys for `
```
{
"ssh":{
"authorized_keys":[
"authorized-keys":[
"ssh-rsa EXAMPLEAUTHORIZEDPUBLICKEYHERE my-key-pair"
],
"trusted_user_ca_keys":[
"trusted-user-ca-keys":[
"ssh-rsa EXAMPLETRUSTEDCAPUBLICKEYHERE [email protected]"
]
}
Expand All @@ -38,6 +38,6 @@ Once you've created your JSON, you'll need to base64-encode it and set it as the

```
[settings.host-containers.admin]
# ex: echo '{"ssh":{"authorized_keys":[]}}' | base64
user-data = "eyJzc2giOnsiYXV0aG9yaXplZF9rZXlzIjpbXX19"
# ex: echo '{"ssh":{"authorized-keys":[]}}' | base64
user-data = "eyJzc2giOnsiYXV0aG9yaXplZC1rZXlzIjpbXX19Cg=="
```
6 changes: 4 additions & 2 deletions start_admin_sshd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ mkdir -p "${USER_SSH_DIR}"
chmod 700 "${USER_SSH_DIR}"

# Populate authorized_keys with all the authorized keys found in user-data
if authorized_keys=$(get_user_data_keys "authorized_keys"); then
if authorized_keys=$(get_user_data_keys "authorized-keys") \
|| authorized_keys=$(get_user_data_keys "authorized_keys"); then
ssh_authorized_keys="${USER_SSH_DIR}/authorized_keys"
touch "${ssh_authorized_keys}"
chmod 600 "${ssh_authorized_keys}"
Expand All @@ -74,7 +75,8 @@ if authorized_keys=$(get_user_data_keys "authorized_keys"); then
fi

# Populate trusted_user_ca_keys with all the trusted ca keys found in user-data
if trusted_user_ca_keys=$(get_user_data_keys "trusted_user_ca_keys"); then
if trusted_user_ca_keys=$(get_user_data_keys "trusted-user-ca-keys") \
|| trusted_user_ca_keys=$(get_user_data_keys "trusted_user_ca_keys"); then
ssh_trusted_user_ca_keys="/etc/ssh/trusted_user_ca_keys.pub"
touch "${ssh_trusted_user_ca_keys}"
chmod 600 "${ssh_trusted_user_ca_keys}"
Expand Down