Applicable to:
- Plesk for Linux
Question
- How to grant a Subscription user SSH/SFTP access to its home directory?
- How to grant a Domain user SSH/SFTP access to its home directory?
- How to grant SSH/SFTP access to the home directory of Subscriptions under a Service Plan?
Answer
Note: The feature to provide SSH access to a particular directory (for example, /var/www/vhosts/example.com/httpdocs/
) is not implemented in Plesk yet. If you would like to see this functionality in Plesk, vote for this feature on Plesk UserVoice. The top-ranked suggestions are likely to be included in the next versions of Plesk.
-
Go to Domains (or Subscriptions) > example.com > Hosting & DNS > Hosting
-
Select a user shell Type in the SSH Access field
Note: To learn more about different types of the shells, visit this KB article.
-
Click OK to apply the changes.
Now, to connect to the Plesk server as a subscription user via SSH, use the Username under System user in Web Hosting Access.
Video instructions
-
Go to Service Plans > Plan_Name > Hosting Parameters.
-
Select a user shell in the SSH access to the server shell under the subscription's system user dropdown list.
Note: To learn more about different types of the shells, visit this this KB article.
-
Additional step: To propagate the new user shell to existing subscriptions, go to Service Plans > plan_name > Default > Permissions tab and set Management of access to the server over SSH to Not Allowed.
- Click Update & Sync to apply the changes and synchronize subscriptions with the service plan.
The same thing can be achieved via commands, as shown in the following section:
Click on a section to expand
You can use the plesk bin service_plan command utility and its -manage_sh_access
and -manage_not_chroot_shell
options for the purpose, an example is provided below:
1. Log into your server via SSH
2. Afterwards, you can execute one of the following commands (depending on your needs):
To allow the users who subscribe to the Service Plan Plan 1 to access over SSH to the chrooted environment on the server.
# plesk bin service_plan -u "Plan 1" -manage_sh_access true
OR
To allow the users who subscribe to the Service Plan Plan 1 to access over SSH to any shell available on the server:
# plesk bin service_plan -u "Plan 1" -manage_not_chroot_shell true
Additional Information
service_plan: Hosting Plans | Plesk Obsidian documentation
subscription_settings: Hosting Subscription Settings | Plesk Obsidian documentation
What is the difference between options 'Access to the server over SSH' parameter in Plesk?
Comments
0 comments
Please sign in to leave a comment.