- Plesk for Linux
How to change Access to the server over SSH (shell) option that is defined in Plesk > Domains > example.com > Web Hosting Access for all/multiple subscriptions via CLI?
Note: the changes below will be done on a subscription level, all additional domains and subdomains inherit subscription's settings.
- Log into the server via SSH.
- Create the list of all subscriptions:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa -Ne"select name from domains where id in (select object_id from Subscriptions)" > list.txt
Note: using text editor, exclude the unnecessary subscriptions from the created
- Execute the command below to apply the new Access to the server over SSH policy for all subscriptions from the
# cat list.txt | while read i; do plesk bin subscription -u $i -shell /bin/bash; done
Note: in the example above the shell is set as
/bin/bash, replace with the required.
Note: to set Access to the server over SSH as Chrooted, use the shell above.
Note: to set Access to the server over SSH as Forbidden, use the shell above.