Accessing the Command Line from the Plesk Interface
概要: Some people may prefer to make changes to their websites using the command line. In Plesk, it is possible to access the SSH or PowerShell command line from the Plesk graphical interface, without using an SSH client or connecting to the server via RDP.
In this topic, you will learn how to access the SSH or PowerShell prompts from the Plesk graphical interface.
前提條件
To enable accessing the command line from the Plesk graphical interface, one of the two free extensions must be installed:
- (Plesk for Linux) SSH Terminal extension.
- (Plesk for Windows) PowerShell Terminal extension.
The extensions are included in the 「Recommended」 preset, but if one is not installed on your Plesk server, you can install it from the Extensions Catalog.
(Plesk for Linux) Accessing the SSH Prompt
The Plesk administrator can access the SSH prompt as the root
user from the Plesk graphical interface.
備註: You can only paste into the SSH prompt using a keyboard shortcut. The shortcut depends on your OS and browser - if 「ctrl + V」 does not work, try 「ctrl + ins」, or 「shift + ins」.
To access the SSH prompt as the root
user:
- 登錄到 Plesk。
- Go to Tools & Settings, and then click SSH Terminal (under 「Tools & Resources」).
A new SSH session for the root
user has started. The terminal uses the /bin/bash
shell.
It is also possible to access the SSH prompt as a website’s system user from the Plesk graphical interface.
備註: To be able to access the command line as a website’s system user, SSH access must first be enabled for that user. The SSH Terminal button is not visible if SSH access for the website’s system user is not enabled, even if the SSH Terminal extension is installed.
To access the SSH prompt as the system user for a website:
- 登錄到 Plesk。
- Go to Websites & Domains, and then locate the required domain.
- Go to the 「Dashboard」 tab, and then click SSH Terminal.
A new SSH session for the website system user has started. The terminal uses the shell specified under 「SSH access」 on the website’s Hosting page.
- The website system user’s permissions are restricted to the files and directories related to the website in question.
- If the SSH access type for the website system user is set to 「/bin/bash (chrooted)」, the
/
directory will be set to the website’s Home directory, and not to the file system’s root directory.
(Plesk for Windows) Accessing the PowerShell Prompt
The Plesk administrator can access the PowerShell prompt as the Plesk Administrator
user from the Plesk graphical interface. The Plesk Administrator
user is a local administrator account.
備註: You can only paste into the SSH prompt using a keyboard shortcut. The shortcut depends on your OS and browser - if 「ctrl + V」 does not work, try 「ctrl + ins」, or 「shift + ins」.
To access the PowerShell prompt as the Plesk Administrator
user:
- 登錄到 Plesk。
- Go to Tools & Settings, and then click PowerShell Terminal (under 「Tools & Resources」).
A new PowerShell session for the Plesk Administrator
user has started.
It is also possible to access the PowerShell prompt as a website’s system user from the Plesk graphical interface.
To access the PowerShell prompt as the system user for a website:
- 登錄到 Plesk。
- Go to Websites & Domains, and then locate the required domain.
- Go to the 「Dashboard」 tab, and then click PowerShell Terminal.
A new PowerShell session for the website system user has started.
備註: The website system user’s permissions are restricted to the files and directories related to the website in question.