-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support keyboard-interactive authentication (#3)
Support keyboard-interactive authentication: * Use PAM-enabled version of OpenSSH. * Install shadow package to allow us to use the chage command to force password expiry. * Update Restart() to stop and start the PAM-enabled version of OpenSSH. * Add method to configure KbdInteractiveAuthentication option. * Fix path to sftp module. * Update TearDown to: ** Reset password of sshnet user back to the default password. ** Use change to remove password expiration for the sshnet user. * Update keyboard-interactive tests to also enable KbdInteractiveAuthentication option. * Add script to remove dangling images. * Enable PAM to allow keyboard-interactive authentication to work with a vanilla container.
- Loading branch information
Showing
9 changed files
with
73 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
@echo off | ||
docker build -t sshnet -f DockerFile . | ||
|
||
rem Build new image | ||
docker build -t sshnet -f DockerFile . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@echo off | ||
|
||
rem Remove dangling images | ||
docker image prune -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
@echo off | ||
docker run --rm -p 22:22 --name sshnet -d sshnet | ||
docker run --rm -p 22:22 --name sshnet -d sshnet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
#!/bin/ash | ||
/usr/sbin/syslog-ng | ||
/usr/sbin/sshd | ||
tail -f < /var/log/auth.log | ||
|
||
# allow us to make changes to /etc/hosts; we need this for the port forwarding tests | ||
chmod 777 /etc/hosts | ||
|
||
# start PAM-enabled ssh daemon as we also want keyboard-interactive authentication to work | ||
/usr/sbin/sshd.pam | ||
|
||
tail -f < /var/log/auth.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters