mirror of
https://github.com/YunoHost-Apps/my_webapp_ynh.git
synced 2024-09-03 19:46:26 +02:00
21 lines
399 B
Bash
21 lines
399 B
Bash
#!/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
|