From cd2941236e25fb78bb6bd6dacbc98be2d229ca64 Mon Sep 17 00:00:00 2001 From: "Patrick J.P. Culp" Date: Wed, 31 Mar 2021 00:36:40 +0000 Subject: [PATCH] Switch paths from host-containers/admin to host-containers/current This replaces any code that referenced `host-containers/admin` with the recently introduced `current` dir to support admin containers with a custom name. --- sshd_config | 6 +++--- start_admin_sshd.sh | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sshd_config b/sshd_config index bdf5175..d63c0d3 100644 --- a/sshd_config +++ b/sshd_config @@ -1,6 +1,6 @@ -HostKey /.bottlerocket/host-containers/admin/etc/ssh/ssh_host_rsa_key -HostKey /.bottlerocket/host-containers/admin/etc/ssh/ssh_host_ecdsa_key -HostKey /.bottlerocket/host-containers/admin/etc/ssh/ssh_host_ed25519_key +HostKey /.bottlerocket/host-containers/current/etc/ssh/ssh_host_rsa_key +HostKey /.bottlerocket/host-containers/current/etc/ssh/ssh_host_ecdsa_key +HostKey /.bottlerocket/host-containers/current/etc/ssh/ssh_host_ed25519_key PasswordAuthentication no diff --git a/start_admin_sshd.sh b/start_admin_sshd.sh index ef4993f..2827690 100644 --- a/start_admin_sshd.sh +++ b/start_admin_sshd.sh @@ -9,8 +9,9 @@ log() { } declare -r local_user="ec2-user" -declare -r ssh_host_key_dir="/.bottlerocket/host-containers/admin/etc/ssh" -declare -r user_data="/.bottlerocket/host-containers/admin/user-data" +declare -r persistent_storage_base_dir="/.bottlerocket/host-containers/current" +declare -r ssh_host_key_dir="${persistent_storage_base_dir}/etc/ssh" +declare -r user_data="${persistent_storage_base_dir}/user-data" declare -r user_ssh_dir="/home/${local_user}/.ssh" available_auth_methods=0