diff options
author | Josh Spicer <joshspicer@github.com> | 2022-05-25 22:53:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-25 22:53:54 +0300 |
commit | a4d434f22df175f6e337fef8f099a197b574f64b (patch) | |
tree | 5cc16619a5b99f0305c488d6f1ba29e2a2db926c /src/sshd | |
parent | 343465890b2b710fd6c9cf33b1365d24a9603147 (diff) |
sync with jammy updates (#21)
sync with jammy updates (https://github.com/microsoft/vscode-dev-containers/commit/053a0557211c98e5b9f0e8ccf755f6f143b05ef4) and other minor additions since copy over
Diffstat (limited to 'src/sshd')
-rw-r--r-- | src/sshd/install.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/sshd/install.sh b/src/sshd/install.sh index eb33a09..3e8d2ec 100644 --- a/src/sshd/install.sh +++ b/src/sshd/install.sh @@ -75,6 +75,13 @@ elif [ "${NEW_PASSWORD}" != "skip" ]; then echo "${USERNAME}:${NEW_PASSWORD}" | chpasswd fi +if [ $(getent group ssh) ]; then + echo "'ssh' group already exists." +else + echo "adding 'ssh' group, as it does not already exist." + groupadd ssh +fi + # Add user to ssh group if [ "${USERNAME}" != "root" ]; then usermod -aG ssh ${USERNAME} @@ -166,4 +173,4 @@ echo -e "Done!\n\n- Port: ${SSHD_PORT}\n- User: ${USERNAME}" if [ "${EMIT_PASSWORD}" = "true" ]; then echo "- Password: ${NEW_PASSWORD}" fi -echo -e "\nForward port ${SSHD_PORT} to your local machine and run:\n\n ssh -p ${SSHD_PORT} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null ${USERNAME}@localhost\n" +echo -e "\nForward port ${SSHD_PORT} to your local machine and run:\n\n ssh -p ${SSHD_PORT} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null ${USERNAME}@localhost\n"
\ No newline at end of file |