Skip to content

Commit

Permalink
Run the tests with an Ubuntu image
Browse files Browse the repository at this point in the history
The system is more complete, though much heavier. This lets us use PAM, which
is required for testing keyboard-interactive authentication.
  • Loading branch information
fmang authored and fwininger committed Jun 2, 2023
1 parent 31b4970 commit 58d327b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM alpine:3.7
FROM ubuntu:latest

RUN apk add openssh --no-cache
RUN apt-get update && apt-get install -y openssh-server

RUN adduser -D alice && (echo alice:alice | chpasswd)
RUN useradd -m alice && (echo alice:alice | chpasswd)
COPY id_ecdsa id_ecdsa.pub id_ed25519 id_ed25519.pub /home/alice/.ssh/
RUN cat /home/alice/.ssh/id_ecdsa.pub /home/alice/.ssh/id_ed25519.pub > /home/alice/.ssh/authorized_keys
COPY ssh_host_ecdsa_key ssh_host_ecdsa_key.pub ssh_host_ed25519_key ssh_host_ed25519_key.pub /etc/ssh/
Expand All @@ -14,4 +14,4 @@ RUN chmod 600 /home/alice/.ssh/* \
COPY sshd_config /etc/ssh/sshd_config

EXPOSE 22
CMD ["/usr/sbin/sshd", "-D", "-e"]
CMD ["service", "ssh", "start", "-D", "-e"]
1 change: 1 addition & 0 deletions spec/sshd_config
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
AuthorizedKeysFile .ssh/authorized_keys

UsePAM yes
ChallengeResponseAuthentication no
PasswordAuthentication yes
PermitEmptyPasswords no
Expand Down

0 comments on commit 58d327b

Please sign in to comment.