Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 7072

Using SSM to push terminal commands

$
0
0

I have an SSM environment in AWS, and I have client machines that are joining without any issues. I am able to remote connect to the terminal and run commands, everything works up to this point.

Now I am trying to run terminal commands on the devices en masse. So I would like to, for example, run this:

echo 192.168.1.1 MyServer.domain.com >> /etc/hostsapt install realmdecho MyPassword | realm join -v --user=MyUsername domain.comsudo reboot

So to package this script up in a tidy little unit of some kind that I can push out to devices as I require. But I can't seem to find any way that this can be done.


Viewing all articles
Browse latest Browse all 7072

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>