By Coeurdelion
Hello and thanks to come here !
I’m writting a new script to save my server. I would like to create a specific user can access to a specific folder on my other server to send files by SCP.
I have seen lot of purposes but now I don’t really know what’s the best thing to do…
If it was possible to ensure that the user is only ssh access to the server to transmit files by SCP, it means no other access like SFTP or FTP. Of course he should not be able to get out of his folder. Finally, if it was possible to forbid the suppression it would be really really awesome for security !
Thanks for all,
Coeurdelion, Full Stack Developper Love DigitalOcean
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello friend!
This is definitely possible. The most popular way to do this is with a chroot jail. I found a tutorial that I think will be great for it:
https://www.tecmint.com/restrict-ssh-user-to-directory-using-chrooted-jail/
Kind Regards, Jarland
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.