33230

plesk api shell access

Question:

i try create script to add new domain in plesk whit api, im write this script :

<packet version='1.4.2'> <domain> <add> <gen_setup> <name>domain.com</name> <client_id>1</client_id> <ip_address>127.0.0.1</ip_address> <status>0</status> </gen_setup> <hosting> <vrt_hst> <ftp_login>username</ftp_login> <ftp_password>password</ftp_password> <php>true</php> <ssi>true</ssi> <cgi>true</cgi> <php_safe_mode>false</php_safe_mode> <ip_address>127.0.0.1</ip_address> </vrt_hst> </hosting> </add> </domain> </packet>

The script add new domain bat not working ssh access, i need add shell access to this script. Thanks all

Answer1:

It depends on plesk/protocol version. Try to add <shell>/bin/bash</shell> in <vrt_hst>...</vrt_hst>

Next query works for Plesk 10/11:

<packet version="1.6.3.0"> <webspace> <add> <gen_setup> <name>example.com</name> <owner-id>1</owner-id> <htype>vrt_hst</htype> <ip_address>10.0.0.1</ip_address> <status>0</status> </gen_setup> <hosting> <vrt_hst> <property> <name>shell</name> <value>/bin/bash</value> </property> <property> <name>ftp_login</name> <value>ftp16se4fdf0</value> </property> <property> <name>ftp_password</name> <value>qweqwe</value> </property> <ip_address>10.0.0.1</ip_address> </vrt_hst> </hosting> </add> </webspace> </packet>

Recommend

  • the dir function in python
  • C# Dynamic template implicit conversion error from System.EventHandler to System.EventHandler
  • merge multidimensional array with sum of values
  • Ionic - Upload file to FTP server
  • How can i ensure this loop runs as expected in node.js
  • Sorl-thumbnail bugs 502 with large image
  • CCA Analysis: Error in weighted.mean.default(newX[, i], …) : 'x' and 'w' must ha
  • GDB step over command
  • how to stop the application from opening in android
  • I want to stop pythoncom working
  • Calculate mean and sd by ID and Day within a column
  • Command to Stop infinte running Angular Server
  • Reading, Adding to and saving a CSV File using Python.
  • Dynamics AX FTP
  • JPA Mapping Multi-Rows with ElementCollection
  • PHP Fatal error: Class 'Controllercommon' not found in C:\\Inetpub\\Low Vision - Phili
  • PHPCrawl fails to create SSL socket
  • connecting to web api using c#
  • Cloudflare and Firebase
  • Make fields editable when a button is clicked
  • “Movie Format Not Supported” on iPhone with YouTube player in a WebView
  • Shortest route between multiple points in mapkit for iphone app
  • Getting socket.io namespace from anywhere in the project
  • Issue when joining serf nodes located in different Docker containers
  • Serverless Framework Dynamo DB Table Resource Definition with Sort Key
  • Getting zero results in search using elastic4s
  • PHP in userdir not working
  • Setting src to Base64-encoded image with Javascript is failing
  • NSMutableArray instance used in a block
  • XOR with Neural Networks (Matlab)
  • pymongo replication secondary readreference not work
  • How to Save JSON data to SQL server database in C#?
  • Can't remove headers after they are sent
  • How to use JavaScript to determine whether a file exists in a directory?
  • How do I pass the string value parameter of the selected list item from an auto-populated dropdown l
  • Can I have the cursor start on a particular column by default in jqgrid's edit mode?
  • Circular dependency while pushing http interceptor
  • how to add data labels for bar graph in matlab
  • Authorize attributes not working in MVC 4
  • UserPrincipal.Current returns apppool on IIS