sshd_config 3.8 KB

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