Skip to content

Commit

Permalink
more isolated integrational testing env
Browse files Browse the repository at this point in the history
  • Loading branch information
corpix committed Aug 15, 2022
1 parent 9a5f7e0 commit 706326e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ test:

.PHONY: run/sshd
run/sshd:
sudo docker run --rm -it --net=host nixos/nix:latest \
sudo docker run --rm -p 127.0.0.1:2222:2222/tcp -it nixos/nix:latest \
nix-shell -p openssh \
--run '{ grep sshd: /etc/passwd > /dev/null || echo "sshd:x:666:666::/:/bin/bash" >> /etc/passwd; } \
&& sed -i "s/^root:!/root:/g" /etc/shadow \
Expand All @@ -72,7 +72,7 @@ run/sshd:
&& cp -Pf /root/.nix-profile/bin/* /usr/bin \
&& cd /etc/ssh \
&& ssh-keygen -A \
&& echo -e "PermitEmptyPasswords yes\nPermitRootLogin yes\nUsePAM no\nLogLevel verbose" \
&& echo -e "PermitEmptyPasswords yes\nPermitRootLogin yes\nUsePAM no\nLogLevel DEBUG1" \
> /etc/ssh/sshd_config \
&& `which sshd` -e -D -p 2222 \
& pid=$$! \
Expand Down

0 comments on commit 706326e

Please sign in to comment.