File tree Expand file tree Collapse file tree 3 files changed +26
-2
lines changed
Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -891,13 +891,20 @@ rm -f /usr/sbin/policy-rc.d
891891# Enable SSH password authentication
892892sed -i " s/rdAuthentication no/rdAuthentication yes/g" /etc/ssh/sshd_config
893893
894+ # Enable SFTP subsystem for SSH
895+ sftp_subsys_enabled=$( grep " #Subsystem sftp-server" /etc/ssh/sshd_config)
896+ if [ ! -z " $sftp_subsys_enabled " ]; then
897+ echo " (*) Updating SFTP subsystem configuration..."
898+ sed -i " s/#Subsystem sftp-server/Subsystem sftp internal-sftp/gI" /etc/ssh/sshd_config
899+ fi
900+
894901# Disable SSH suffix broadcast
895902if [ -z " $( grep " ^DebianBanner no" /etc/ssh/sshd_config) " ]; then
896903 echo ' ' >> /etc/ssh/sshd_config
897904 echo ' DebianBanner no' >> /etc/ssh/sshd_config
898- service ssh restart
899905fi
900906
907+ # Restart SSH daemon
901908service ssh restart
902909
903910# Disable AWStats cron
Original file line number Diff line number Diff line change @@ -865,13 +865,22 @@ rm -f /usr/sbin/policy-rc.d
865865# Enable SSH password authentication
866866sed -i " s/rdAuthentication no/rdAuthentication yes/g" /etc/ssh/sshd_config
867867
868+ # Enable SFTP subsystem for SSH
869+ sftp_subsys_enabled=$( grep " #Subsystem sftp-server" /etc/ssh/sshd_config)
870+ if [ ! -z " $sftp_subsys_enabled " ]; then
871+ echo " (*) Updating SFTP subsystem configuration..."
872+ sed -i " s/#Subsystem sftp-server/Subsystem sftp internal-sftp/gI" /etc/ssh/sshd_config
873+ fi
874+
868875# Disable SSH suffix broadcast
869876if [ -z " $( grep " ^DebianBanner no" /etc/ssh/sshd_config) " ]; then
870877 echo ' ' >> /etc/ssh/sshd_config
871878 echo ' DebianBanner no' >> /etc/ssh/sshd_config
872- service ssh restart
873879fi
874880
881+ # Restart SSH daemon
882+ service ssh restart
883+
875884# Disable AWStats cron
876885rm -f /etc/cron.d/awstats
877886
Original file line number Diff line number Diff line change 344344# Run sftp jail once
345345$HESTIA /bin/v-add-sys-sftp-jail
346346
347+ # Enable SFTP subsystem for SSH
348+ sftp_subsys_enabled=$( cat /etc/ssh/sshd_config | grep " #Subsystem sftp-server" )
349+ if [ ! -z " $sftp_subsys_enabled " ]; then
350+ echo " (*) Updating SFTP subsystem configuration..."
351+ sed -i " s/#Subsystem sftp-server/Subsystem sftp internal-sftp/gI" /etc/ssh/sshd_config
352+ service ssh restart
353+ fi
354+
347355# Remove and migrate obsolete object keys
348356for user in ` ls /usr/local/hestia/data/users/` ; do
349357 USER_DATA=$HESTIA /data/users/$user
You can’t perform that action at this time.
0 commit comments