From ffda0fa7ef2d34a09c1203b9407c5c8fa2ee1862 Mon Sep 17 00:00:00 2001 From: Oleksandr Bezdieniezhnykh Date: Mon, 12 Aug 2024 17:54:04 +0300 Subject: [PATCH] add init sftp script --- scripts/init-sftp.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 scripts/init-sftp.sh diff --git a/scripts/init-sftp.sh b/scripts/init-sftp.sh new file mode 100644 index 0000000..91dd0c5 --- /dev/null +++ b/scripts/init-sftp.sh @@ -0,0 +1,17 @@ +sudo -s +apt update +apt upgrade +apt install -y ssh + +groupadd sftp +useradd -g sftp -M -p Azaion1000sftp01 -d /azaion-media -s /bin/false sftpuser + +cat <> /etc/ssh/sshd_config +Match Group sftp + ChrootDirectory /azaion-media + X11Forwarding no + ForceCommand internal-sftp + AllowTcpForwarding no + PasswordAuthentication yes +EOT +service ssh restart \ No newline at end of file