Skip to content

How2MCoffc/sftp-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 

Repository files navigation

How-To-Setup-FTP-Access

You need to be outside of any folder or file or directory and You must Be in root user mode sudo -s or sudo su.

Create User:

sudo useradd -d /var/www username

Set a Password:

sudo passwd username

Set directory permission for the user:

nano /etc/ssh/sshd_config

Paste the lines:

subsystem sftp internal-sftp #(Ignore this line if it is already there in the file, just uncomment the exsisting line.)
Match User username
ChrootDirectory %h
AllowTCPForwarding no
X11Forwarding no
ForceCommand internal-sftp

Image

Image

Set permission(important):

sudo chown -R username:username /var/www/pterodactyl sudo chmod -R 755 /var/www/pterodactyl

Restart the SSH:

sudo service ssh restart sudo systemctl restart sshd

Note

The Port 22 Shoud Be Opened In The Firewall.

About

This repo is used to setup sftp user in ubuntu or in any other Linux based distro.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published