0
0
Fork 0
mirror of https://github.com/atmoz/sftp.git synced 2024-11-17 12:51:33 -05:00

Install makepasswd

This commit is contained in:
Adrian Dvergsdal 2016-08-06 17:44:44 +02:00
parent 4b018c9c62
commit cab9eb428b
2 changed files with 5 additions and 5 deletions

View file

@ -5,10 +5,10 @@ MAINTAINER Adrian Dvergsdal [atmoz.net]
# - OpenSSH needs /var/run/sshd to run # - OpenSSH needs /var/run/sshd to run
# - Remove generic host keys, entrypoint generates unique keys # - Remove generic host keys, entrypoint generates unique keys
RUN apt-get update && \ RUN apt-get update && \
apt-get -y install openssh-server && \ apt-get -y install openssh-server makepasswd && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /var/run/sshd && \ mkdir -p /var/run/sshd && \
rm -f /etc/ssh/ssh_host_*key* && \ rm -f /etc/ssh/ssh_host_*key*
rm -rf /var/lib/apt/lists/*
COPY sshd_config /etc/ssh/sshd_config COPY sshd_config /etc/ssh/sshd_config
COPY entrypoint / COPY entrypoint /

View file

@ -77,8 +77,8 @@ docker run \
'foo:$1$0G2g0GSt$ewU0t6GXG15.0hWoOX8X9.:e:1001' 'foo:$1$0G2g0GSt$ewU0t6GXG15.0hWoOX8X9.:e:1001'
``` ```
Tip: you can use makepasswd to generate encrypted passwords: Tip: you can use [makepasswd](https://packages.debian.org/jessie/makepasswd) (included in the debian image) to generate encrypted passwords:
`echo -n "password" | makepasswd --crypt-md5 --clearfrom -` `echo -n "password" | docker run -i --rm --entrypoint=makepasswd atmoz/sftp:debian --crypt-md5 --clearfrom -`
## Using SSH key (without password) ## Using SSH key (without password)