#!/bin/bash action=$1 pending_dir=$4 ssh_conf=$pending_dir/../ssh/etc/ssh/sshd_config [[ $action == "pre" ]] || exit 0 [[ -e $ssh_conf ]] || exit 0 echo " ##-> __APP__ # Hardening user connection Match User __USER__ ChrootDirectory %h ForceCommand internal-sftp AllowTcpForwarding no PermitTunnel no X11Forwarding no PasswordAuthentication yes ##<- __APP__" >> $ssh_conf