Page 1 of 1

[HOW TO] Jailkit on SFTP Chroot plugin for SSH and SFTP

Posted: Tue Dec 06, 2016 7:52 am
by scope
Hello guys, today I'm publishing my first VestaCP modification :D

Jailkit chrooting for Vesta Control Panel v0.9.8-17

This is a modification I've made to VestaCP code which implements Jailkit chrooting. With this modification you're able to restrict users to their home directories on SSH and SFTP. VestaCP v0.9.8-17 already have a plugin for this named SFTP Chroot, so this works over it, that means you need to buy the plugin for getting this to work. The difference witheen the SFTP Chroot plugin and this modification is that you're able to give users SSH or SFTP access restricted to their home directory, with the official plugin you are only able to use SFTP restriction. It is useful if for example you wanna allow a user to use composer, or any other shell command you desire.

Read the How to? for understanding a little bit more what it does.

GitHub repository

Requirements

Roadmap

Installation

How to?

License

Do not doubt taking a look at the code and leaving your feedback. Thanks!
Greetings from Argentina.

Re: [HOW TO] Jailkit on SFTP Chroot plugin for SSH and SFTP

Posted: Wed Dec 07, 2016 1:43 pm
by mike08
This should be posted as an idea for next releases as this is really useful. Will be testing it on our nodes and see how it goes! :)

Re: [HOW TO] Jailkit on SFTP Chroot plugin for SSH and SFTP

Posted: Thu Dec 08, 2016 1:26 pm
by scope
mike08 wrote:This should be posted as an idea for next releases as this is really useful. Will be testing it on our nodes and see how it goes! :)
Thanks! Let me know if you find any issue :)

Re: [HOW TO] Jailkit on SFTP Chroot plugin for SSH and SFTP

Posted: Fri Jan 20, 2017 12:08 pm
by mike08
I made some modifications on the scripts in order to include the right bin path for Debian 7, however whenever a new user is created and granted the recommended ssh access, the user can still do something like this.

UserA <-- Restricted ssh
Can run

Code: Select all

nano /home/userb/web/domain/public_html/wp-config.php
And get a read permissions of the php file containing DB details.