--- /dev/null
+# will allow uploads to /home/upload _if_ user has password
+# (set with 'passwd upload', unset with 'password -d upload')
+Match User upload
+ PasswordAuthentication yes
+ ForceCommand internal-sftp
+
+ # some sane restrictions
+ AllowAgentForwarding no
+ AllowTcpForwarding no
+ PermitTunnel no
+ PermitTTY no
+ PubkeyAuthentication no
Include /etc/ssh/sshd_config.d/*.conf
PermitRootLogin no
PasswordAuthentication no
+KbdInteractiveAuthentication no
UsePAM yes
ClientAliveInterval 15
Subsystem sftp /usr/lib/openssh/sftp-server
check_finished_marker 'setup_server'
install_tags seedbox
-echo "\nActivating rtorrent tmux session service."
+echo 'Setting up upload user/directory.'
+adduser --quiet --system --home /home/upload
+
+echo 'Activating rtorrent tmux session service.'
systemctl enable --now rtorrent
. lib/setup_user
. lib/set_hostname_and_hosts
-INSTALL_TAGS='all server'
+INSTALL_TAGS='all server user'
expect_n_args 2 3 'CADDY_PASSWORD, HOSTNAME, [FQDN]' $@
CADDY_PASSWORD="$1"