Advertisement
Guest User

Untitled

a guest
Jun 6th, 2012
834
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.99 KB | None | 0 0
  1. # Package generated configuration file
  2. # See the sshd_config(5) manpage for details
  3. # -----------------------------------------------------------------------------
  4. #AllowUsers <username>
  5. AllowGroups srv-admn dev sftp-only
  6. # -----------------------------------------------------------------------------
  7. # What ports, IPs and protocols we listen for
  8. Port 22
  9.  
  10. # Use these options to restrict which interfaces/protocols sshd will bind to
  11. #ListenAddress ::
  12. #ListenAddress 0.0.0.0
  13. Protocol 2
  14.  
  15. # HostKeys for protocol version 2
  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.  
  20. #Privilege Separation is turned on for security
  21. UsePrivilegeSeparation yes
  22.  
  23. # Lifetime and size of ephemeral version 1 server key
  24. KeyRegenerationInterval 3600
  25. ServerKeyBits 768
  26.  
  27. # Logging
  28. SyslogFacility AUTH
  29. LogLevel INFO
  30.  
  31. # Authentication:
  32. LoginGraceTime 120
  33. PermitRootLogin no
  34. StrictModes yes
  35.  
  36. RSAAuthentication yes
  37. PubkeyAuthentication yes
  38. AuthorizedKeysFile %h/.ssh/authorized_keys
  39.  
  40. # Don't read the user's ~/.rhosts and ~/.shosts files
  41. IgnoreRhosts yes
  42.  
  43. # For this to work you will also need host keys in /etc/ssh_known_hosts
  44. RhostsRSAAuthentication no
  45.  
  46. # similar for protocol version 2
  47. HostbasedAuthentication no
  48.  
  49. # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
  50. #IgnoreUserKnownHosts yes
  51.  
  52. # To enable empty passwords, change to yes (NOT RECOMMENDED)
  53. PermitEmptyPasswords no
  54.  
  55. # Change to yes to enable challenge-response passwords (beware issues with
  56. # some PAM modules and threads)
  57. ChallengeResponseAuthentication no
  58.  
  59. # Change to no to disable tunnelled clear text passwords
  60. #PasswordAuthentication yes
  61.  
  62. # Kerberos options
  63. #KerberosAuthentication no
  64. #KerberosGetAFSToken no
  65. #KerberosOrLocalPasswd yes
  66. #KerberosTicketCleanup yes
  67.  
  68. # GSSAPI options
  69. #GSSAPIAuthentication no
  70. #GSSAPICleanupCredentials yes
  71.  
  72. X11Forwarding yes
  73. X11DisplayOffset 10
  74. PrintMotd no
  75. PrintLastLog yes
  76. TCPKeepAlive yes
  77. #UseLogin no
  78.  
  79. #MaxStartups 10:30:60
  80. #Banner /etc/issue.net
  81.  
  82. # Allow client to pass locale environment variables
  83. AcceptEnv LANG LC_*
  84.  
  85. #Subsystem sftp /usr/lib/openssh/sftp-server
  86. Subsystem sftp sftp-server
  87.  
  88. # Set this to 'yes' to enable PAM authentication, account processing,
  89. # and session processing. If this is enabled, PAM authentication will
  90. # be allowed through the ChallengeResponseAuthentication and
  91. # PasswordAuthentication. Depending on your PAM configuration,
  92. # PAM authentication via ChallengeResponseAuthentication may bypass
  93. # the setting of "PermitRootLogin without-password".
  94. # If you just want the PAM account and session checks to run without
  95. # PAM authentication, then enable this but set PasswordAuthentication
  96. # and ChallengeResponseAuthentication to 'no'.
  97. UsePAM yes
  98. IgnoreUserKnownHosts no
  99. PasswordAuthentication yes
  100.  
  101. # SFTP authentication ONLY configuration.
  102.  
  103. Match Group sftp-only
  104. ChrootDirectory /home/%u/public
  105. X11Forwarding no
  106. AllowTcpForwarding no
  107. ForceCommand internal-sftp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement