2020-01-05 22:35:15 -01:00
|
|
|
# /etc/ssh/sshd_config
|
|
|
|
#
|
|
|
|
# This is the sshd server system-wide configuration file. See
|
|
|
|
# sshd_config(5) for more information.
|
|
|
|
|
2020-11-25 12:45:46 -01:00
|
|
|
Port 22
|
2020-01-05 22:35:15 -01:00
|
|
|
#AddressFamily any
|
2021-05-02 13:29:21 +00:00
|
|
|
ListenAddress 0.0.0.0
|
|
|
|
ListenAddress ::
|
2020-01-05 22:35:15 -01:00
|
|
|
|
|
|
|
#HostKey /etc/ssh/ssh_host_rsa_key
|
|
|
|
#HostKey /etc/ssh/ssh_host_dsa_key
|
|
|
|
#HostKey /etc/ssh/ssh_host_ecdsa_key
|
|
|
|
HostKey /etc/ssh/ssh_host_ed25519_key
|
|
|
|
|
|
|
|
# Limit Host Key Algorithms
|
2020-01-06 14:13:42 -01:00
|
|
|
HostKeyAlgorithms ssh-ed25519-cert-v01@openssh.com,ssh-ed25519
|
2020-01-05 22:35:15 -01:00
|
|
|
|
|
|
|
# Limit Key Exchange Algorithms
|
|
|
|
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
|
|
|
|
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
|
|
|
|
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com
|
|
|
|
|
|
|
|
# Logging
|
|
|
|
#SyslogFacility AUTH
|
|
|
|
LogLevel VERBOSE
|
|
|
|
|
|
|
|
#LoginGraceTime 2m
|
2021-05-02 13:29:21 +00:00
|
|
|
PermitRootLogin yes
|
2020-01-05 22:35:15 -01:00
|
|
|
#StrictModes yes
|
2021-05-02 13:29:21 +00:00
|
|
|
MaxAuthTries 3
|
2020-01-05 22:35:15 -01:00
|
|
|
MaxSessions 4
|
|
|
|
|
2021-05-02 13:29:21 +00:00
|
|
|
# Only allow root to login
|
|
|
|
AllowGroups root
|
2020-01-05 22:35:15 -01: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
|
|
|
|
|
|
|
|
# To disable tunneled clear text passwords, change to no here!
|
|
|
|
PasswordAuthentication no
|
|
|
|
|
|
|
|
# Change to no to disable s/key passwords
|
|
|
|
ChallengeResponseAuthentication no
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
AllowAgentForwarding no
|
2021-05-02 13:29:21 +00:00
|
|
|
AllowTcpForwarding yes
|
2020-01-05 22:35:15 -01:00
|
|
|
#GatewayPorts no
|
|
|
|
#X11Forwarding no
|
|
|
|
#X11DisplayOffset 10
|
|
|
|
#X11UseLocalhost yes
|
|
|
|
#PermitTTY yes
|
|
|
|
PrintMotd no
|
|
|
|
PrintLastLog yes
|
|
|
|
TCPKeepAlive no
|
|
|
|
#UseLogin no
|
|
|
|
#PermitUserEnvironment no
|
|
|
|
Compression delayed
|
|
|
|
ClientAliveInterval 300
|
|
|
|
ClientAliveCountMax 2
|
|
|
|
#UseDNS no
|
|
|
|
#PidFile /run/sshd.pid
|
|
|
|
#MaxStartups 10:30:100
|
|
|
|
#PermitTunnel no
|
|
|
|
#ChrootDirectory none
|
|
|
|
#VersionAddendum none
|
|
|
|
|
|
|
|
# override default of no subsystems
|
|
|
|
Subsystem sftp /usr/lib64/misc/sftp-server
|