mirror of
https://github.com/azaion/ai-training.git
synced 2026-04-23 01:36:34 +00:00
add init sftp script
This commit is contained in:
@@ -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 <<EOT >> /etc/ssh/sshd_config
|
||||
Match Group sftp
|
||||
ChrootDirectory /azaion-media
|
||||
X11Forwarding no
|
||||
ForceCommand internal-sftp
|
||||
AllowTcpForwarding no
|
||||
PasswordAuthentication yes
|
||||
EOT
|
||||
service ssh restart
|
||||
Reference in New Issue
Block a user