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

No need for group, forced sftp

This commit is contained in:
Adrian Dvergsdal 2014-10-16 22:07:39 +02:00
parent 17c854b0f6
commit 2505784452
3 changed files with 6 additions and 11 deletions

View file

@ -4,7 +4,6 @@ MAINTAINER Adrian Dvergsdal
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install openssh-server
RUN mkdir -p /var/run/sshd
RUN addgroup --system sftp
ADD . /root
WORKDIR /root

4
run
View file

@ -7,11 +7,11 @@ for userData in "${users[@]}"; do
user="${data[0]}"
pass="${data[1]}"
useradd -G sftp $user
useradd $user
echo "$user:$pass" | chpasswd
chown root:root /home/$user
chmod 755 /home/$user
chown -R $user:sftp /home/$user/*
chown -R $user:users /home/$user/*
done
# Run SSH

View file

@ -1,9 +1,5 @@
PermitRootLogin no
#ChallengeResponseAuthentication no
UsePAM no
Subsystem sftp internal-sftp
Match group sftp
ChrootDirectory %h
X11Forwarding no
AllowTcpForwarding no