sshd_config

Default etc/ssh/sshd_config file for ssh:

# $OpenBSD: sshd_config,v 1.89 2013/02/06 00:20:42 dtucker Exp $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.

22
any
0.0.0.0
::

# The default requires explicit activation of protocol 1
2

# HostKey for protocol version 1
/etc/ssh/ssh_host_key
# HostKeys for protocol version 2
/etc/ssh/ssh_host_rsa_key
/etc/ssh/ssh_host_dsa_key
/etc/ssh/ssh_host_ecdsa_key

# Lifetime and size of ephemeral version 1 server key
1h
1024

# Logging
# obsoletes QuietMode and FascistLogging
AUTH
INFO

# Authentication:

2m
yes
yes
6
10

yes
yes

# 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

#AuthorizedPrincipalsFile none

#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
no
# similar for protocol version 2
no
# Change to yes if you don’t trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
no
# Don’t read the user’s ~/.rhosts and ~/.shosts files
yes

# To disable tunneled clear text passwords, change to no here!
yes
no

# Change to no to disable s/key passwords
ChallengeResponseAuthentication no

# Kerberos options
no
yes
yes
no

# GSSAPI options
no
yes

# 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

yes
yes
no
no
10
yes
PrintMotd no # pam does that
yes
yes
no
UsePrivilegeSeparation sandbox # Default for new installations.
no
delayed
0
#ClientAliveCountMax 3
yes
/run/sshd.pid
10:30:100
no
none
none

# no default banner path
none

# override default of no subsystems
Subsystem sftp /usr/lib/ssh/sftp-server

# Example of overriding settings on a per-user basis
User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# ForceCommand cvs server

Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.