-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
98 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Largely borrowed from https://github.com/corbinu/ssh-server | ||
|
||
FROM quay.io/osmirnov/radiopadre:1.2.2 | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
openssh-server \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN mkdir -p /var/run/sshd \ | ||
&& mkdir /root/.ssh \ | ||
&& chmod 700 /root/.ssh \ | ||
&& touch /root/.ssh/authorized_keys | ||
|
||
COPY sshd_config /etc/ssh/sshd_config | ||
|
||
EXPOSE 22 | ||
|
||
# RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key | ||
RUN chmod 600 /etc/ssh/ssh_host_rsa_key | ||
|
||
ENTRYPOINT ["/usr/sbin/sshd", "-D"] |
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,10 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
if [ "$1" = 'ssh-server' ] | ||
then | ||
exec /usr/sbin/sshd -D | ||
fi | ||
|
||
exec "$@" |
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,66 @@ | ||
# Logging | ||
SyslogFacility AUTH | ||
LogLevel INFO | ||
|
||
# Authentication: | ||
LoginGraceTime 120 | ||
PermitRootLogin without-password | ||
StrictModes yes | ||
|
||
PubkeyAuthentication yes | ||
#AuthorizedKeysFile %h/.ssh/authorized_keys | ||
|
||
HostKey /etc/ssh/ssh_host_rsa_key | ||
|
||
# Don't read the user's ~/.rhosts and ~/.shosts files | ||
IgnoreRhosts yes | ||
# similar for protocol version 2 | ||
HostbasedAuthentication no | ||
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication | ||
#IgnoreUserKnownHosts yes | ||
|
||
# To enable empty passwords, change to yes (NOT RECOMMENDED) | ||
PermitEmptyPasswords no | ||
|
||
# Change to yes to enable challenge-response passwords (beware issues with | ||
# some PAM modules and threads) | ||
ChallengeResponseAuthentication no | ||
|
||
# Change to no to disable tunnelled clear text passwords | ||
PasswordAuthentication no | ||
|
||
# Kerberos options | ||
#KerberosAuthentication no | ||
#KerberosGetAFSToken no | ||
#KerberosOrLocalPasswd yes | ||
#KerberosTicketCleanup yes | ||
|
||
# GSSAPI options | ||
#GSSAPIAuthentication no | ||
#GSSAPICleanupCredentials yes | ||
|
||
X11Forwarding yes | ||
X11DisplayOffset 10 | ||
PrintMotd no | ||
PrintLastLog yes | ||
TCPKeepAlive yes | ||
#UseLogin no | ||
|
||
#MaxStartups 10:30:60 | ||
#Banner /etc/issue.net | ||
|
||
# Allow client to pass locale environment variables | ||
AcceptEnv LANG LC_* | ||
|
||
Subsystem sftp /usr/lib/openssh/sftp-server | ||
|
||
# Set this to 'yes' to enable PAM authentication, account processing, | ||
# and session processing. If this is enabled, PAM authentication will | ||
# be allowed through the ChallengeResponseAuthentication and | ||
# PasswordAuthentication. Depending on your PAM configuration, | ||
# PAM authentication via ChallengeResponseAuthentication may bypass | ||
# the setting of "PermitRootLogin without-password". | ||
# If you just want the PAM account and session checks to run without | ||
# PAM authentication, then enable this but set PasswordAuthentication | ||
# and ChallengeResponseAuthentication to 'no'. | ||
UsePAM yes |