diff --git a/README.md b/README.md index 0870096..d8309f9 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ docker run --rm -it -p 2222:22 -v ~/my_ssh_keys:/root/.ssh/ gaff/alpine-sshd ``` ``` -docker run --rm -it -p 2222:22 -e AUTHORIZED_KEY="`cat authorized_keys`" gaff/alpine-sshd +docker run --rm -it -p 2222:22 -e AUTHORIZED_KEY="`cat id_rsa.pub`" gaff/alpine-sshd ``` diff --git a/build.sh b/build.sh index 8053cbb..65e9979 100644 --- a/build.sh +++ b/build.sh @@ -8,6 +8,7 @@ apk add openssh rsync mkdir -p ~root/.ssh && chmod 700 ~root/.ssh/ sed -i '/AuthorizedKeysFile/s/^/#/' /etc/ssh/sshd_config echo -e "Port 22\n" >> /etc/ssh/sshd_config + #Add an extra AuthorizedKeysFile so that people can hard-bake their own keys if they wish. echo -e "AuthorizedKeysFile .ssh/authorized_keys /authorized_keys\n" >> /etc/ssh/sshd_config echo -e "PasswordAuthentication no" >> /etc/ssh/sshd_config