- Plesk for Linux
How to change Access to the server over SSH (shell) that is defined in GUI in Domains > example.com > Web Hosting Access for all domains at once?
- Log into the server via SSH.
- Get the list of all subscriptions with the command:
# 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
Note: The change is done on a subscription level, so all additional domains and subdomains will inherit subscription's settings.
- Apply the new Access to the server over SSH policy for all domains from the list. For example, to set /bin/bash shell for all domains, execute:
# cat list | while read i; do plesk bin subscription -u $i -shell /bin/bash; done
Note: If required, edit the list to adjust subscription names.
The -shell option is described in details in Plesk Guide.