1
0

sshd_config 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. # $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $
  2. # This is the sshd server system-wide configuration file. See
  3. # sshd_config(5) for more information.
  4. # This sshd was compiled with PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
  5. # The strategy used for options in the default sshd_config shipped with
  6. # OpenSSH is to specify options with their default value where
  7. # possible, but leave them commented. Uncommented options override the
  8. # default value.
  9. # If you want to change the port on a SELinux system, you have to tell
  10. # SELinux about this change.
  11. # semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
  12. #
  13. #Port 22
  14. #AddressFamily any
  15. #ListenAddress 0.0.0.0
  16. #ListenAddress ::
  17. HostKey /etc/ssh/ssh_host_rsa_key
  18. HostKey /etc/ssh/ssh_host_ecdsa_key
  19. HostKey /etc/ssh/ssh_host_ed25519_key
  20. # Ciphers and keying
  21. #RekeyLimit default none
  22. # This system is following system-wide crypto policy. The changes to
  23. # crypto properties (Ciphers, MACs, ...) will not have any effect here.
  24. # They will be overridden by command-line options passed to the server
  25. # on command line.
  26. # Please, check manual pages for update-crypto-policies(8) and sshd_config(5).
  27. # Logging
  28. #SyslogFacility AUTH
  29. SyslogFacility AUTHPRIV
  30. #LogLevel INFO
  31. # Authentication:
  32. #LoginGraceTime 2m
  33. PermitRootLogin yes
  34. #StrictModes yes
  35. #MaxAuthTries 6
  36. #MaxSessions 10
  37. #PubkeyAuthentication yes
  38. # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
  39. # but this is overridden so installations will only check .ssh/authorized_keys
  40. AuthorizedKeysFile .ssh/authorized_keys
  41. #AuthorizedPrincipalsFile none
  42. #AuthorizedKeysCommand none
  43. #AuthorizedKeysCommandUser nobody
  44. # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
  45. #HostbasedAuthentication no
  46. # Change to yes if you don't trust ~/.ssh/known_hosts for
  47. # HostbasedAuthentication
  48. #IgnoreUserKnownHosts no
  49. # Don't read the user's ~/.rhosts and ~/.shosts files
  50. #IgnoreRhosts yes
  51. # To disable tunneled clear text passwords, change to no here!
  52. #PasswordAuthentication yes
  53. #PermitEmptyPasswords no
  54. PasswordAuthentication yes
  55. # Change to no to disable s/key passwords
  56. #ChallengeResponseAuthentication yes
  57. ChallengeResponseAuthentication no
  58. # Kerberos options
  59. #KerberosAuthentication no
  60. #KerberosOrLocalPasswd yes
  61. #KerberosTicketCleanup yes
  62. #KerberosGetAFSToken no
  63. #KerberosUseKuserok yes
  64. # GSSAPI options
  65. GSSAPIAuthentication yes
  66. GSSAPICleanupCredentials no
  67. #GSSAPIStrictAcceptorCheck yes
  68. #GSSAPIKeyExchange no
  69. #GSSAPIEnablek5users no
  70. # Set this to 'yes' to enable PAM authentication, account processing,
  71. # and session processing. If this is enabled, PAM authentication will
  72. # be allowed through the ChallengeResponseAuthentication and
  73. # PasswordAuthentication. Depending on your PAM configuration,
  74. # PAM authentication via ChallengeResponseAuthentication may bypass
  75. # the setting of "PermitRootLogin without-password".
  76. # If you just want the PAM account and session checks to run without
  77. # PAM authentication, then enable this but set PasswordAuthentication
  78. # and ChallengeResponseAuthentication to 'no'.
  79. # WARNING: 'UsePAM no' is not supported in Fedora and may cause several
  80. # problems.
  81. UsePAM yes
  82. #AllowAgentForwarding yes
  83. #AllowTcpForwarding yes
  84. #GatewayPorts no
  85. X11Forwarding yes
  86. #X11DisplayOffset 10
  87. #X11UseLocalhost yes
  88. #PermitTTY yes
  89. # It is recommended to use pam_motd in /etc/pam.d/sshd instead of PrintMotd,
  90. # as it is more configurable and versatile than the built-in version.
  91. PrintMotd no
  92. #PrintLastLog yes
  93. #TCPKeepAlive yes
  94. #PermitUserEnvironment no
  95. #Compression delayed
  96. #ClientAliveInterval 0
  97. #ClientAliveCountMax 3
  98. #UseDNS no
  99. #PidFile /var/run/sshd.pid
  100. #MaxStartups 10:30:100
  101. #PermitTunnel no
  102. #ChrootDirectory none
  103. #VersionAddendum none
  104. # no default banner path
  105. #Banner none
  106. # Accept locale-related environment variables
  107. AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
  108. AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
  109. AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
  110. AcceptEnv XMODIFIERS
  111. # override default of no subsystems
  112. Subsystem sftp /usr/libexec/openssh/sftp-server
  113. # Example of overriding settings on a per-user basis
  114. #Match User anoncvs
  115. # X11Forwarding no
  116. # AllowTcpForwarding no
  117. # PermitTTY no
  118. # ForceCommand cvs server