Plesk 17下用户SSH访问权限配置及子域名限制问题咨询
Issue 2: Restricting SSH access to a single subdomain
By default, if you're using the same system user for multiple domains/subdomains, they'll have access to all associated directories. To lock this down to a single subdomain, follow these steps:
- Create a dedicated system user for the subdomain: Navigate to
Domains > [Your Subdomain] > Web Hosting Access. Under the System User section, create a unique username (don't reuse the main domain's user). Set a password or upload an SSH key for authentication. This user's home directory will automatically point to the subdomain's document root, and Plesk's isolation will prevent them from accessing other domains' files. - Enable chroot jail (optional but recommended): As an admin, go to
Tools & Settings > SSH Server Settingsand enable Chroot jail for SSH users. This restricts the user to their home directory (the subdomain's document root) entirely—they won't be able to navigate up to the server's root or other domain directories. - Restrict to document root: In the subdomain's
Web Hosting Accesssettings, ensure the checkbox for Restrict to the document root directory is ticked. This adds an extra layer of protection, preventing the user from browsing outside their assigned directory even if chroot isn't enabled.
内容的提问来源于stack exchange,提问作者Matthew Flynn
相关产品推荐
相关产品推荐

