shell-things/etc/ssh/sshd_config

64 lines
2.0 KiB
Plaintext
Raw Normal View History

2015-08-30 15:54:21 +02:00
# OpenSSH /etc/ssh/sshd_config. I am removing commented lines for this to
# be more clear and if they are missed some day, just download
# upstream config file or take it from any distribution.
Port 22
2015-08-30 15:54:21 +02:00
AddressFamily any
2014-12-27 10:09:00 +01:00
ListenAddress 0.0.0.0
ListenAddress ::
# The default requires explicit activation of protocol 1
2014-12-27 10:09:00 +01:00
Protocol 2
2014-12-27 10:09:00 +01:00
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_ed25519_key
2015-08-30 15:54:21 +02:00
HostKey /etc/ssh/ssh_host_rsa_key
2014-12-27 10:09:00 +01:00
## IF THE HOST KEYS ARE MISSING, RUN THE FOLLOWING AS ROOT:
# ssh-keygen -t ed25519 -N "" -f /etc/ssh/ssh_host_ed25519_key
2015-08-30 15:54:21 +02:00
# ssh-keygen -t rsa -N "" -f /etc/ssh/ssh_host_rsa_key
2014-12-27 10:09:00 +01:00
# Uncomment one of the following depending on which OS
## Arch
2015-09-01 15:48:27 +02:00
Subsystem sftp /usr/lib/ssh/sftp-server
## Debian
#Subsystem sftp /usr/lib/openssh/sftp-server
2014-12-27 10:09:00 +01:00
# Logging
LogLevel VERBOSE
# Authentication:
2015-08-30 15:54:21 +02:00
PermitRootLogin No
2014-12-27 10:09:00 +01:00
2015-08-30 15:54:21 +02:00
# The default is to check both .ssh/authorized_keys and
# .ssh/authorized_keys2 but this is overridden so installations will only
# check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys
2014-12-27 10:09:00 +01:00
2015-08-30 15:54:21 +02:00
# Password based logins are disabled - only public key based logins are
# allowed.
AuthenticationMethods publickey
2014-12-27 10:09:00 +01:00
2015-08-30 15:54:21 +02:00
# Disable tunneled clear text passwords!
2014-12-27 10:09:00 +01:00
PasswordAuthentication no
2015-08-30 15:54:21 +02:00
# Disable s/key passwords
ChallengeResponseAuthentication no
2014-12-27 10:09:00 +01:00
# 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
PrintMotd no # pam does that
UsePrivilegeSeparation sandbox # Default for new installations.
2015-08-28 18:25:18 +02:00
Banner /etc/issue.net