-
-
Save raojeet/22bd9106d9467071cb1c552399f7c116 to your computer and use it in GitHub Desktop.
Revisions
-
raojeet revised this gist
Apr 25, 2020 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,11 @@ STEPS to CREATE sftp # generate key ssh-keygen #Configure an SSH/SFTP User for Your Key #add public key in below path .ssh/authorized_keys To Create a SFTP server for user to login and access particular folder Steps 1: Create an additional folder and assign root access alone -
manimike00 revised this gist
Jul 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,7 +28,7 @@ Step 4: Assign Ownership to directories accordingly Step 5: Edit /etc/ssh/sshd_config and add those line at the bottom. (Its Enough editing once and every time adding user it applies to every user) # nano /etc/ssh/sshd_config -
manimike00 revised this gist
Jul 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ To Create a SFTP server for user to login and access particular folder Steps 1: Create an additional folder and assign root access alone -
manimike00 created this gist
Jul 4, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,47 @@ To Create a SFTP login for user to access particular folder Steps 1: Create an additional folder and assign root access alone # mkdir -p /data # chmod 701 /data Step 2: Create a group for the SFTP user's # groupadd group-name Step 3: Create User and assign Password # useradd -g group-name -d /upload -s /sbin/nologin user-name # passwd user-name Step 4: Assign Ownership to directories accordingly # mkdir -p /data/user-name/upload # chown -R root:group-name /data/user-name # chown -R user-name:group-name /data/user-name/upload Step 5: Edit /etc/ssh/sshd_config and add those line at the bottom. (Its Enough edit once and every time adding user it applies to every user) # nano /etc/ssh/sshd_config Match Group group-name ChrootDirectory /data/%u ForceCommand internal-sftp Step 6: Restart the SSH service # systemctl restart ssh Step 7: Testing # sftp -i "key-pair" user-name@IPaddress