diff --git a/Makefile b/Makefile index 871d328..92579b1 100644 --- a/Makefile +++ b/Makefile @@ -117,16 +117,18 @@ endif docker push $(DEPLOY_ACCOUNT)/$(DEPLOY_IMAGE):$(tag) ssh-server: - adduser -h /home/drone-scp -s /bin/bash -D -S drone-scp + adduser -h /home/drone-scp -s /bin/sh -D -S drone-scp echo drone-scp:1234 | chpasswd mkdir -p /home/drone-scp/.ssh chmod 700 /home/drone-scp/.ssh cat tests/.ssh/id_rsa.pub >> /home/drone-scp/.ssh/authorized_keys cat tests/.ssh/test.pub >> /home/drone-scp/.ssh/authorized_keys + chmod 600 /home/drone-scp/.ssh/authorized_keys chown -R drone-scp /home/drone-scp/.ssh # install ssh and start server apk add --update openssh openrc rm -rf /etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_dsa_key + sed -i 's/^#PubkeyAuthentication yes/PubkeyAuthentication yes/g' /etc/ssh/sshd_config sed -i 's/AllowTcpForwarding no/AllowTcpForwarding yes/g' /etc/ssh/sshd_config ./tests/entrypoint.sh /usr/sbin/sshd -D &