Get remote deployment servers in plugin

Hello,

i'm very new in plugin-developement and i stuck at the following problem:

How can i get the list of the defined developement servers (ssh) from the current project (phpstorm) to upload a temp file 
and execute a cmd on the remote server?

Many thanks for help

Micha 

0

Hello,

If you’re developing a PhpStorm plugin and want to interact with your project’s defined SSH servers, you can access them using the RemoteServersManager class. This manager provides a list of all deployment servers configured in the project, allowing you to retrieve details such as server name, host, and port. Once you have a server instance, you can establish an SSH connection using the appropriate connection handler, which enables you to upload temporary files to the server and execute commands remotely. This approach leverages PhpStorm’s SDK deployment APIs, providing a structured way to automate file transfers and remote execution directly from your plugin. For detailed guidance, the JetBrains SDK documentation on deployment and remote connections is a helpful resource.

0

请先登录再写评论。