<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Remote scripts on CloudBolt Documentation</title>
		<link>https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/</link>
		<description>Recent content in Remote scripts on CloudBolt Documentation</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<atom:link href="https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Supported platforms and execution methods</title>
				<link>https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/supported-platforms/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/supported-platforms/</guid>
				<description>&lt;p&gt;Cloud Management Platform (CMP) runs a remote script either over SSH or WinRM, which works on any platform, or through a platform-specific mechanism, which is available on a few. Some operating systems and platforms require setup first; see &lt;a href=&#34;https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/os-specific-requirements/&#34;&gt;OS-specific requirements&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;ssh-and-winrm&#34;&gt;SSH and WinRM&lt;/h2&gt;&#xA;&lt;p&gt;The generic method works on a server of any resource technology. What it needs is a network route from the CMP appliance to the server and credentials that CMP can authenticate with. The platform the server runs on does not matter.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Authentication requirements</title>
				<link>https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/authentication-requirements/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/authentication-requirements/</guid>
				<description>&lt;p&gt;Cloud Management Platform (CMP) must be able to authenticate with the remote guest in order to interact with it. That is done with either a password or an SSH key, depending on the resource handler and OS involved.&lt;/p&gt;&#xA;&lt;h2 id=&#34;passwords&#34;&gt;Passwords&lt;/h2&gt;&#xA;&lt;p&gt;VMware relies on passwords for accessing VMs. Authentication with these servers requires a password and sometimes a username.&lt;/p&gt;&#xA;&lt;p&gt;Credentials can be set in several places:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;On the server&amp;rsquo;s details page.&lt;/strong&gt; For a server that has already been provisioned, view or update its credentials here to match the VM&amp;rsquo;s actual configuration.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;On the template.&lt;/strong&gt; Set credentials before provisioning so they are applied to new servers built from it.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;On the group, environment, or globally.&lt;/strong&gt; Set the &lt;strong&gt;Password&lt;/strong&gt; and, if needed, &lt;strong&gt;Username&lt;/strong&gt; parameters at any of these levels.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;On a remote script action.&lt;/strong&gt; Credentials set here override any set on the server when that action runs.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;These credentials are associated with the server during provisioning, so they are available for running remote scripts at provision time or later. The username must be provided explicitly unless it is &lt;code&gt;ubuntu&lt;/code&gt; for Ubuntu servers, &lt;code&gt;root&lt;/code&gt; for other *nix distributions, or &lt;code&gt;Administrator&lt;/code&gt; for Windows.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Configure remote script method</title>
				<link>https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/configure-method/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/configure-method/</guid>
				<description>&lt;p&gt;Cloud Management Platform (CMP) runs remote scripts through a platform-specific mechanism where one exists, and over SSH or WinRM otherwise. You can change that choice globally, or for particular servers and environments.&lt;/p&gt;&#xA;&lt;h2 id=&#34;choose-the-execution-method&#34;&gt;Choose the execution method&lt;/h2&gt;&#xA;&lt;p&gt;What happens by default depends on the platform:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;VMware&lt;/strong&gt; runs remote scripts through VMware Tools.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;AWS, Azure, and Oracle Cloud Infrastructure&lt;/strong&gt; can run scripts through their own channels, but do not by default; you must enable it.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Every other platform&lt;/strong&gt; uses SSH or WinRM.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The &lt;strong&gt;Use Tech-Specific Script Execution&lt;/strong&gt; parameter sets this per server or environment: &lt;code&gt;True&lt;/code&gt; to use the platform&amp;rsquo;s own mechanism, &lt;code&gt;False&lt;/code&gt; to use SSH for *nix and WinRM for Windows.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Write remote scripts</title>
				<link>https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/write/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/write/</guid>
				<description>&lt;p&gt;A remote script can be written in any scripting language, as long as that language is installed on the target server and allowed to run there. On Windows, the execution policy must permit the script. On *nix, the script must begin with a shebang line.&lt;/p&gt;&#xA;&lt;h2 id=&#34;shebang-lines&#34;&gt;Shebang lines&lt;/h2&gt;&#xA;&lt;p&gt;A bash script starts with one of these:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/bash&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;or the more portable form, which resolves bash through &lt;code&gt;env&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/usr/bin/env bash&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The portable form requires the interpreter to be on the &lt;code&gt;PATH&lt;/code&gt; of the target server.&lt;/p&gt;</description>
			</item>
			<item>
				<title>AWS tech-specific script execution</title>
				<link>https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/aws/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/aws/</guid>
				<description>&lt;p&gt;Tech-specific script execution lets Cloud Management Platform (CMP) run remote scripts on an EC2 instance it cannot reach directly over SSH or WinRM. CMP instead uses the AWS Systems Manager (SSM) &lt;strong&gt;Run Command&lt;/strong&gt; feature, which delivers the script to the instance and reports the result back.&lt;/p&gt;&#xA;&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;&#xA;&lt;p&gt;Set these up in AWS before configuring anything in CMP.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Instances must have the SSM Agent installed. See &lt;a href=&#34;#images-with-the-ssm-agent-pre-installed&#34;&gt;Images with the SSM Agent pre-installed&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Linux instances&lt;/strong&gt; need port 443 reachable, or a correctly configured VPC endpoint for SSM.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Windows instances&lt;/strong&gt; need port 3389 open. The default launch-wizard security groups do &lt;strong&gt;not&lt;/strong&gt; work. Use an instance type of &lt;strong&gt;t2.small&lt;/strong&gt; or larger for acceptable performance, and allow a few minutes longer than Linux for SSM to finish installing: an instance can report &lt;strong&gt;Running&lt;/strong&gt; before SSM is ready. The instance system log in AWS helps here.&lt;/li&gt;&#xA;&lt;li&gt;If the deployment has no internet access over port 443, configure &lt;strong&gt;VPC endpoints&lt;/strong&gt;. See &lt;a href=&#34;https://repost.aws/knowledge-center/ec2-systems-manager-vpc-endpoints&#34;&gt;the AWS guidance on creating VPC endpoints&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;roles-and-policies&#34;&gt;Roles and policies&lt;/h3&gt;&#xA;&lt;p&gt;Roles are what SSM support in CMP rests on. Create an IAM role in AWS for SSM, for example &lt;code&gt;EnablesEC2ToAccessSystemsManagerRole&lt;/code&gt;. CMP uses it to enable SSM on supported operating systems. See &lt;a href=&#34;https://docs.aws.amazon.com/systems-manager/latest/userguide/prereqs-operating-systems.html&#34;&gt;Supported operating systems&lt;/a&gt; in the AWS documentation.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Azure tech-specific script execution</title>
				<link>https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/azure/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/azure/</guid>
				<description>&lt;p&gt;Tech-specific script execution lets Cloud Management Platform (CMP) run remote scripts on an Azure VM it cannot reach directly over SSH or WinRM. CMP uses the Azure &lt;strong&gt;Run Command&lt;/strong&gt; feature, so Azure delivers the script to the VM and reports the result back.&lt;/p&gt;&#xA;&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;An Azure resource handler with an environment.&lt;/li&gt;&#xA;&lt;li&gt;An Azure account with the VMs you intend to run scripts on.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Azure imposes its own limits on what Run Command can do. See the Microsoft documentation for &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/virtual-machines/windows/run-command&#34;&gt;running PowerShell scripts on a Windows VM&lt;/a&gt; and &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/virtual-machines/linux/run-command&#34;&gt;shell scripts on a Linux VM&lt;/a&gt;, particularly the listed restrictions.&lt;/p&gt;</description>
			</item>
			<item>
				<title>OCI tech-specific script execution</title>
				<link>https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/oci/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/oci/</guid>
				<description>&lt;p&gt;In Cloud Management Platform (CMP), this is an alternative to SSH, controlled by a server parameter. When enabled, ad hoc scripts are executed by the &lt;a href=&#34;https://docs.oracle.com/en-us/iaas/Content/Compute/Tasks/manage-plugins.htm&#34;&gt;Oracle Cloud Agent&lt;/a&gt; running on the instance rather than over an SSH connection.&lt;/p&gt;&#xA;&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;&#xA;&lt;p&gt;This method provides additional security; however, due to the Oracle Cloud Agent&amp;rsquo;s polling interval, it is slower than SSH.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;how-it-works&#34;&gt;How it works&lt;/h2&gt;&#xA;&lt;p&gt;The Oracle Cloud Agent polls for queued commands approximately every 90 seconds. When CMP submits a script to run on an OCI server with tech-specific script execution enabled, the command is added to the Oracle Cloud Agent&amp;rsquo;s queue. The agent picks up the command on its next poll, executes the script, and returns the output.&lt;/p&gt;</description>
			</item>
			<item>
				<title>OS-specific requirements</title>
				<link>https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/os-specific-requirements/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/os-specific-requirements/</guid>
				<description>&lt;p&gt;These requirements apply to the generic execution method. A server that runs scripts through its platform&amp;rsquo;s own mechanism, such as a VMware server using VMware Tools, does not need them. See &lt;a href=&#34;https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/configure-method/&#34;&gt;Configure remote script method&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;nix-servers-using-ssh&#34;&gt;*nix servers using SSH&lt;/h2&gt;&#xA;&lt;p&gt;Cloud Management Platform (CMP) copies the script to the server and runs it over SSH. For that to work:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The server&amp;rsquo;s IP address must be routable from the CMP appliance. In public cloud environments, this often means using a public IP address.&lt;/li&gt;&#xA;&lt;li&gt;CMP must know the server&amp;rsquo;s IP address, usually because CMP provisioned it or the resource handler reports it.&lt;/li&gt;&#xA;&lt;li&gt;TCP port 22 must be open. Test this by opening an SSH session from the CMP appliance to the server.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;sshd&lt;/code&gt; must be installed and running on the server, with password authentication enabled in its configuration if you authenticate by password.&lt;/li&gt;&#xA;&lt;li&gt;The package providing the &lt;code&gt;scp&lt;/code&gt; client must be installed on the server: &lt;code&gt;openssh-clients&lt;/code&gt; on CentOS and RHEL, &lt;code&gt;openssh-client&lt;/code&gt; on Debian and Ubuntu, or the equivalent.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;&#xA;&lt;p&gt;If scripts fail due to a permissions error, point CMP to a directory the connecting user owns, such as a path under that user&amp;rsquo;s home directory, instead of the default temporary directory. Change it in &lt;strong&gt;Admin&lt;/strong&gt; &amp;gt; &lt;strong&gt;Miscellaneous Settings&lt;/strong&gt; &amp;gt; &lt;strong&gt;Resource management&lt;/strong&gt; tab &amp;gt; &lt;strong&gt;*nix Temporary Directory for Remote Scripts&lt;/strong&gt;, and verify that the ownership and permissions on that directory are correct.&lt;/p&gt;&#xA;&lt;/div&gt;</description>
			</item>
			<item>
				<title>Examples</title>
				<link>https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/examples/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://docs.cloudbolt.io/docs/cmp/use/orchestration/remote-scripts/examples/</guid>
				<description>&lt;h2 id=&#34;expire-a-user-password&#34;&gt;Expire a user password&lt;/h2&gt;&#xA;&lt;p&gt;Expires the named user&amp;rsquo;s password, so that the user must set a new one at next login. Replace &lt;code&gt;cbuser&lt;/code&gt; with the account you want to expire.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/bash&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;passwd --expire cbuser&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;join-a-windows-server-to-an-ou&#34;&gt;Join a Windows server to an OU&lt;/h2&gt;&#xA;&lt;p&gt;On a Windows server, this executes as PowerShell and joins the server to the given domain and organizational unit. Replace the domain, OU, and account values with your own.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
