Skip to content

Commit 6969459

Browse files
Merge pull request #200 from rediculum/master
Add attribute for sftp subsystem logging
2 parents e99a3bf + dee3969 commit 6969459

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

attributes/default.rb

+1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114

115115
# sshd sftp options
116116
server['sftp']['enable'] = false
117+
server['sftp']['log_level'] = 'VERBOSE'
117118
server['sftp']['group'] = 'sftponly'
118119
server['sftp']['chroot'] = '/home/%u'
119120
server['sftp']['password_authentication'] = false

templates/default/opensshd.conf.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,11 @@ AcceptEnv <%= @node['ssh-hardening']['ssh']['server']['accept_env'].join(' ') %>
214214
# Configuration, in case SFTP is used
215215
## override default of no subsystems
216216
## Subsystem sftp /opt/app/openssh5/libexec/sftp-server
217-
Subsystem sftp internal-sftp -l VERBOSE
217+
Subsystem sftp internal-sftp -l <%= @node['ssh-hardening']['ssh']['server']['sftp']['log_level'] %>
218218

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

0 commit comments

Comments
 (0)