Skip to content

Commit

Permalink
Merge pull request #200 from rediculum/master
Browse files Browse the repository at this point in the history
Add attribute for sftp subsystem logging
  • Loading branch information
artem-sidorenko authored Oct 8, 2018
2 parents e99a3bf + dee3969 commit 6969459
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@

# sshd sftp options
server['sftp']['enable'] = false
server['sftp']['log_level'] = 'VERBOSE'
server['sftp']['group'] = 'sftponly'
server['sftp']['chroot'] = '/home/%u'
server['sftp']['password_authentication'] = false
Expand Down
4 changes: 2 additions & 2 deletions templates/default/opensshd.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,11 @@ AcceptEnv <%= @node['ssh-hardening']['ssh']['server']['accept_env'].join(' ') %>
# Configuration, in case SFTP is used
## override default of no subsystems
## Subsystem sftp /opt/app/openssh5/libexec/sftp-server
Subsystem sftp internal-sftp -l VERBOSE
Subsystem sftp internal-sftp -l <%= @node['ssh-hardening']['ssh']['server']['sftp']['log_level'] %>

## These lines must appear at the *end* of sshd_config
Match Group <%= @node['ssh-hardening']['ssh']['server']['sftp']['group'] %>
ForceCommand internal-sftp -l VERBOSE
ForceCommand internal-sftp -l <%= @node['ssh-hardening']['ssh']['server']['sftp']['log_level'] %>
ChrootDirectory <%= @node['ssh-hardening']['ssh']['server']['sftp']['chroot'] %>
AllowTcpForwarding no
AllowAgentForwarding no
Expand Down

0 comments on commit 6969459

Please sign in to comment.