File tree 3 files changed +6
-4
lines changed
3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ override['ssh-hardening']['ssh']['server']['listen_to'] = node['ipaddress']
75
75
* ` ['ssh-hardening']['ssh']['server']['sftp']['enable'] ` - ` false ` . Set to ` true ` to enable the SFTP feature of OpenSSH daemon
76
76
* ` ['ssh-hardening']['ssh']['server']['sftp']['group'] ` - ` sftponly ` . Sets the ` Match Group ` option of SFTP to allow SFTP only for dedicated users
77
77
* ` ['ssh-hardening']['ssh']['server']['sftp']['chroot'] ` - ` /home/%u ` . Sets the directory where the SFTP user should be chrooted
78
+ * ` ['ssh-hardening']['ssh']['server']['sftp']['password_authentication'] ` - ` false ` . Set to ` true ` if password authentication should be enabled
78
79
* ` ['ssh-hardening']['ssh']['server']['authorized_keys_path'] ` - ` nil ` . If not nil, full path to an authorized keys folder is expected
79
80
* ` ['ssh-hardening']['ssh']['server']['extras'] ` - ` {} ` . Add extra configuration options, see [ below] ( #extra-configuration-options ) for details
80
81
Original file line number Diff line number Diff line change 112
112
server [ 'extras' ] = { }
113
113
114
114
# sshd sftp options
115
- server [ 'sftp' ] [ 'enable' ] = false
116
- server [ 'sftp' ] [ 'group' ] = 'sftponly'
117
- server [ 'sftp' ] [ 'chroot' ] = '/home/%u'
115
+ server [ 'sftp' ] [ 'enable' ] = false
116
+ server [ 'sftp' ] [ 'group' ] = 'sftponly'
117
+ server [ 'sftp' ] [ 'chroot' ] = '/home/%u'
118
+ server [ 'sftp' ] [ 'password_authentication' ] = false
118
119
end
Original file line number Diff line number Diff line change @@ -222,7 +222,7 @@ ForceCommand internal-sftp -l VERBOSE
222
222
ChrootDirectory <%= @node['ssh-hardening']['ssh']['server']['sftp']['chroot'] %>
223
223
AllowTcpForwarding no
224
224
AllowAgentForwarding no
225
- PasswordAuthentication no
225
+ PasswordAuthentication <%= ((@node['ssh-hardening']['ssh']['server']['sftp']['password_authentication']) ? 'yes' : 'no' ) %>
226
226
PermitRootLogin no
227
227
X11Forwarding no
228
228
<% else %>
You can’t perform that action at this time.
0 commit comments