cleanning in /compose/debug
|
@ -1,3 +0,0 @@
|
|||
.git
|
||||
.gitignore
|
||||
README.md
|
|
@ -1 +0,0 @@
|
|||
.idea
|
|
@ -15,7 +15,7 @@ RUN mkdir -p /var/run/sshd
|
|||
|
||||
# Copy configuration and entrypoint script
|
||||
COPY sshd_config /etc/ssh/sshd_config
|
||||
ADD .ssh_keys_to_docker/id_rsa.pub /ssh_id_rsa.pub
|
||||
ADD keys_to_docker/id_rsa.pub /ssh_id_rsa.pub
|
||||
|
||||
COPY entrypoint /
|
||||
|
||||
|
|
|
@ -1,82 +1,81 @@
|
|||
# TODO: this could use some cleanup...
|
||||
|
||||
# der Port auf dem der ssh Server auf Verbindungen "warten" soll
|
||||
# What ports, IPs and protocols we listen for
|
||||
Port 22
|
||||
|
||||
# Wenn AllowUsers definiert wurde, dann ist das anmelden auf dem SSH Server nur diesen Usern erlaubt.
|
||||
# Man kann mehrere User angeben. Sie werden dann durch Leerzeichen getrennt.
|
||||
#AllowUsers SystemUsername
|
||||
# The option AllowUsers specifies and controls which users can access ssh
|
||||
# services. Multiple users can be specified, separated by spaces.
|
||||
#AllowUsers SystemUsername/
|
||||
|
||||
# Mit der aktuellen Version ist nur noch SSH2 erlaubt, aber bei älteren Versionen wäre auch SSH1 möglich.
|
||||
# Mit der Angabe von Protocol 2 beschränkt man es aber auf SSH2.
|
||||
Protocol 2
|
||||
|
||||
# Mit ListenAddress kann man angeben an welchen Interfaces der sshd lauschen soll.
|
||||
# Der Standard 0.0.0.0 lauscht an alles verfügbaren Interfaces.
|
||||
# Man sollte es auf 1 Interface beschränken.
|
||||
# The option ListenAddress specifies the IP address of the interface network
|
||||
# on which the ssh daemon server socket is bind. The default is 0.0.0.0; to
|
||||
# improve security you may specify only the required ones to limit possible
|
||||
# addresses.
|
||||
ListenAddress 0.0.0.0
|
||||
|
||||
# Der Pfad zum private Key
|
||||
# The option HostKey specifies the location containing the private host key.
|
||||
HostKey /etc/ssh/ssh_host_rsa_key
|
||||
HostKey /etc/ssh/ssh_host_dsa_key
|
||||
|
||||
# Logging
|
||||
# The option SyslogFacility specifies the facility code used when logging
|
||||
# messages from sshd. The facility specifies the subsystem that produced the
|
||||
# message--in our case, AUTH.
|
||||
SyslogFacility AUTH
|
||||
|
||||
# The option LogLevel specifies the level that is used when logging messages
|
||||
# from sshd.INFO is a good choice. See the man page for sshd for more
|
||||
# information on other possibilities.
|
||||
LogLevel INFO
|
||||
|
||||
# Wenn aktiviert, dann wird eine eingehende Verbindung vom Hauptprozess getrennt.
|
||||
# Außerdem läuft sie dann unter den Rechten das angemeldeten Users.
|
||||
# Default ist yes und so sollte es auch bleiben.
|
||||
UsePrivilegeSeparation yes
|
||||
|
||||
# Nach den hier angegebenen Sekunden wird die Verbindung getrennt
|
||||
# wenn der User sich nicht erfolgreich angemeldet hat
|
||||
# The option LoginGraceTime specifies how long in seconds after a connection
|
||||
# request the server will wait before disconnecting if the user has not
|
||||
# successfully logged in.
|
||||
LoginGraceTime 120
|
||||
|
||||
# Mit PermitRootLogin kann man dem User root verbieten sich per SSH anzumelden.
|
||||
# Auch das ist eine Sicherheitseinstellung die Bruteforce Attacken auf den root User verhindern soll.
|
||||
# no = keine Rootanmeldung per SSH erlaubt | yes = root kann sich anmelden
|
||||
# The option PermitRootLogin specifies whether root can log in using ssh.
|
||||
# Never say yes to this option.
|
||||
PermitRootLogin no
|
||||
|
||||
# Überprüft die Besitzrechte der Userdateien und des Homedirs bevor sich ein User anmelden kann
|
||||
# The option StrictModes specifies whether ssh should check user's permissions
|
||||
# in their home directory and rhosts files before accepting login. This option
|
||||
# must always be set to yes because sometimes users may accidentally leave
|
||||
# their directory or files world-writable.
|
||||
StrictModes yes
|
||||
|
||||
# Erlaubt Public Key Authentification
|
||||
# Default ist yes, wenn man es nicht benutzt kann man es auch abschalten
|
||||
PubkeyAuthentication yes
|
||||
|
||||
# Erlaubt die Anmeldung mit Passwörtern. Bevor man dies abschaltet, sollte man einen anderen Weg haben!
|
||||
PasswordAuthentication yes
|
||||
|
||||
# Da es nur Protocol Version 1 betrifft ist es nicht wichtig zu setzen.
|
||||
# Am besten man setzt es trotzdem, aber dann auf no!
|
||||
RSAAuthentication no
|
||||
|
||||
# Es sollen keine ~/.rhosts und ~/.shosts Dateien im Homedir geladen werden
|
||||
IgnoreRhosts yes
|
||||
|
||||
# Auch ein Überbleibsel von SSH1. No ist richtig!
|
||||
RhostsRSAAuthentication no
|
||||
|
||||
# Eine vergleichbare Funktion von RhostsRSAAuthentication, aber für SSH2.
|
||||
# Hab ich noch nie gebraucht.
|
||||
HostbasedAuthentication no
|
||||
|
||||
# Wenn man es auch yes setzt, kann man sich mit leeren Passwörtern anmelden.
|
||||
# Da sagt der gesunde Menschenverstand schon etwas anderes.
|
||||
# The option IgnoreRhosts specifies whether rhosts or shosts files should not
|
||||
# be used in authentication. For security reasons it is recommended to no use
|
||||
# rhosts or shosts files for authentication.
|
||||
IgnoreRhosts yes
|
||||
|
||||
# The option RhostsRSAAuthentication specifies whether to try rhosts
|
||||
# authentication in concert with RSA host authentication.
|
||||
RhostsRSAAuthentication no
|
||||
|
||||
# The option PermitEmptyPasswords specifies whether the server allows logging
|
||||
# in to accounts with a null password. If you intend to use the scp utility
|
||||
# to make automatic backups over the network, you must set this option to yes
|
||||
PermitEmptyPasswords no
|
||||
|
||||
# Ist ein Brutforce Schutz, der die maximalen unautorisierten Verbindungen steuert.
|
||||
# Specifies the maximum number of concurrent unauthenticated connections to
|
||||
# the SSH daemon. Additional connections will be dropped until authentication
|
||||
# succeeds or the LoginGraceTime expires for a connection.
|
||||
MaxStartups 10:30:60
|
||||
|
||||
# Aktiviert das Subsystem sftp
|
||||
#Subsystem sftp /usr/lib/openssh/sftp-server
|
||||
Subsystem sftp internal-sftp
|
||||
|
||||
# Wenn man dies auf yes setzt wird einem User die /etc/motd angezeigt wenn er sich verbindet.
|
||||
# The option PrintMotd specifies whether the ssh daemon should print the
|
||||
# contents of the /etc/motd file when a user logs in interactively. The
|
||||
# /etc/motd file is also known as the message of the day.
|
||||
PrintMotd no
|
||||
|
||||
# Diese Settings sollten selbsterklärend sein.
|
||||
KeepAlive yes
|
||||
PrintLastLog yes
|
||||
UsePAM yes
|
||||
|
|
|
@ -35,7 +35,7 @@ You can test ssh conection using password *docker*, by::
|
|||
|
||||
or you can also use ssh-key::
|
||||
|
||||
ssh -i compose/debug/.ssh_keys_to_docker/id_rsa docker_{{ cookiecutter.repo_name }}@localhost -p 2222
|
||||
ssh -i compose/debug/keys_to_docker/id_rsa docker_{{ cookiecutter.repo_name }}@localhost -p 2222
|
||||
|
||||
|
||||
PyCharm
|
||||
|
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 143 KiB |