Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ISPConfig 3
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Helmo
ISPConfig 3
Commits
74b3b31f
Commit
74b3b31f
authored
Jan 28, 2019
by
Helmo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Config option for jailkit authorized keys, #4901
parent
04d8e6f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
install/tpl/server.ini.master
install/tpl/server.ini.master
+1
-0
server/plugins-available/shelluser_jailkit_plugin.inc.php
server/plugins-available/shelluser_jailkit_plugin.inc.php
+2
-1
No files found.
install/tpl/server.ini.master
View file @
74b3b31f
...
...
@@ -140,6 +140,7 @@ jailkit_chroot_home=/home/[username]
jailkit_chroot_app_sections=basicshell editors extendedshell netutils ssh sftp scp groups jk_lsh
jailkit_chroot_app_programs=/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico /usr/bin/mysql /usr/bin/mysqldump /usr/bin/git /usr/bin/git-receive-pack /usr/bin/git-upload-pack /usr/bin/unzip /usr/bin/zip /bin/tar /bin/rm /usr/bin/patch /usr/bin/which /usr/lib/x86_64-linux-gnu/libmemcached.so.11 /usr/lib/x86_64-linux-gnu/libmemcachedutil.so.2 /usr/lib/x86_64-linux-gnu/libMagickWand-6.Q16.so.2 /opt/php-5.6.8/bin/php /opt/php-5.6.8/include /opt/php-5.6.8/lib
jailkit_chroot_cron_programs=/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php
jailkit_chroot_authorized_keys_template=/root/.ssh/authorized_keys
[vlogger]
config_dir=/etc
...
...
server/plugins-available/shelluser_jailkit_plugin.inc.php
View file @
74b3b31f
...
...
@@ -489,7 +489,8 @@ class shelluser_jailkit_plugin {
if
(
!
file_exists
(
$sshkeys
)){
// add root's key
$app
->
file
->
mkdirs
(
$sshdir
,
'0755'
);
if
(
is_file
(
'/root/.ssh/authorized_keys'
))
$app
->
system
->
file_put_contents
(
$sshkeys
,
$app
->
system
->
file_get_contents
(
'/root/.ssh/authorized_keys'
));
$authorized_keys_template
=
$this
->
jailkit_config
[
'jailkit_chroot_authorized_keys_template'
];
if
(
is_file
(
'/root/.ssh/authorized_keys'
))
$app
->
system
->
file_put_contents
(
$sshkeys
,
$app
->
system
->
file_get_contents
(
$authorized_keys_template
));
// Remove duplicate keys
$existing_keys
=
@
file
(
$sshkeys
,
FILE_IGNORE_NEW_LINES
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment