{"id":497,"date":"2019-03-08T04:48:12","date_gmt":"2019-03-08T04:48:12","guid":{"rendered":"https:\/\/mrjsec.co.uk\/blog\/?p=497"},"modified":"2019-03-13T19:25:10","modified_gmt":"2019-03-13T19:25:10","slug":"saltstack","status":"publish","type":"post","link":"https:\/\/mrjsec.co.uk\/blog\/saltstack\/","title":{"rendered":"<center>SaltStack<\/center>"},"content":{"rendered":"\n<p style=\"text-align:center\">I won&#8217;t be creating a full guide on how to use SaltStack, just a simple setup guide. More information on SaltStack is on their website <a href=\"https:\/\/docs.saltstack.com\/en\/latest\/contents.html\">here<\/a>.<\/p>\n\n\n\n<p style=\"text-align:center\">Installing the salt master is simple and can be done by using the commands<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\nsudo apt install salt-master -y<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"882\" height=\"454\" data-attachment-id=\"498\" data-permalink=\"https:\/\/mrjsec.co.uk\/blog\/saltstack\/1-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/1.png?fit=882%2C454&amp;ssl=1\" data-orig-size=\"882,454\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/1.png?fit=700%2C360&amp;ssl=1\" src=\"https:\/\/i1.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/1.png?fit=700%2C360&amp;ssl=1\" alt=\"\" class=\"wp-image-498\" srcset=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/1.png?w=882&amp;ssl=1 882w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/1.png?resize=300%2C154&amp;ssl=1 300w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/1.png?resize=768%2C395&amp;ssl=1 768w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/1.png?resize=700%2C360&amp;ssl=1 700w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n\n<p style=\"text-align:center\">I\u2019m using Ubuntu 18.04.2 x64 as the Salt Master; if you&#8217;re facing issues installing I would recommend checking out the SaltStack install <a href=\"https:\/\/repo.saltstack.com\/\">page<\/a> it covers most distros and windows! <\/p>\n\n\n\n<p style=\"text-align:center\">Using the\ncommand \u201csudo salt-master \u2013version\u201d shows what Salt Master version you have\ninstalled and to ensure installed correctly.&nbsp;\n<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"420\" height=\"83\" data-attachment-id=\"499\" data-permalink=\"https:\/\/mrjsec.co.uk\/blog\/saltstack\/2-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/2.png?fit=420%2C83&amp;ssl=1\" data-orig-size=\"420,83\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/2.png?fit=420%2C83&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/2.png?resize=420%2C83&#038;ssl=1\" alt=\"\" class=\"wp-image-499\" srcset=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/2.png?w=420&amp;ssl=1 420w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/2.png?resize=300%2C59&amp;ssl=1 300w\" sizes=\"auto, (max-width: 420px) 100vw, 420px\" \/><\/figure><\/div>\n\n\n\n<p style=\"text-align:center\">Salt master is\nup and running its time to add minions, for this example three minions Kali,\nMint and Parrot. One of the best parts I love about SaltStack is the fact\nminions won&#8217;t need any open ports, only the salt master needs TCP port 4505 and\n4506 open.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"686\" height=\"506\" data-attachment-id=\"500\" data-permalink=\"https:\/\/mrjsec.co.uk\/blog\/saltstack\/3-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/3.png?fit=686%2C506&amp;ssl=1\" data-orig-size=\"686,506\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"3\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/3.png?fit=686%2C506&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/3.png?resize=686%2C506&#038;ssl=1\" alt=\"\" class=\"wp-image-500\" srcset=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/3.png?w=686&amp;ssl=1 686w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/3.png?resize=300%2C221&amp;ssl=1 300w\" sizes=\"auto, (max-width: 686px) 100vw, 686px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"816\" height=\"363\" data-attachment-id=\"501\" data-permalink=\"https:\/\/mrjsec.co.uk\/blog\/saltstack\/4-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/4.png?fit=816%2C363&amp;ssl=1\" data-orig-size=\"816,363\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"4\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/4.png?fit=700%2C311&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/4.png?fit=700%2C311&amp;ssl=1\" alt=\"\" class=\"wp-image-501\" srcset=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/4.png?w=816&amp;ssl=1 816w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/4.png?resize=300%2C133&amp;ssl=1 300w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/4.png?resize=768%2C342&amp;ssl=1 768w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/4.png?resize=700%2C311&amp;ssl=1 700w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"824\" height=\"544\" data-attachment-id=\"502\" data-permalink=\"https:\/\/mrjsec.co.uk\/blog\/saltstack\/5-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/5.png?fit=824%2C544&amp;ssl=1\" data-orig-size=\"824,544\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"5\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/5.png?fit=700%2C462&amp;ssl=1\" src=\"https:\/\/i2.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/5.png?fit=700%2C462&amp;ssl=1\" alt=\"\" class=\"wp-image-502\" srcset=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/5.png?w=824&amp;ssl=1 824w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/5.png?resize=300%2C198&amp;ssl=1 300w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/5.png?resize=768%2C507&amp;ssl=1 768w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/5.png?resize=700%2C462&amp;ssl=1 700w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n\n<p style=\"text-align:center\">Using the\napt command to install the salt-minion, the commands as followed:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\nsudo apt install salt-minion -y<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"704\" height=\"489\" data-attachment-id=\"503\" data-permalink=\"https:\/\/mrjsec.co.uk\/blog\/saltstack\/6-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/6.png?fit=704%2C489&amp;ssl=1\" data-orig-size=\"704,489\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"6\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/6.png?fit=700%2C486&amp;ssl=1\" src=\"https:\/\/i1.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/6.png?fit=700%2C486&amp;ssl=1\" alt=\"\" class=\"wp-image-503\" srcset=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/6.png?w=704&amp;ssl=1 704w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/6.png?resize=300%2C208&amp;ssl=1 300w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/6.png?resize=700%2C486&amp;ssl=1 700w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n\n<p style=\"text-align:center\">Using the\ncommand \u201csudo salt-minion \u2013version&#8221; shows what Salt Minion version you\nhave installed and to ensure it installed correctly.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"678\" height=\"486\" data-attachment-id=\"504\" data-permalink=\"https:\/\/mrjsec.co.uk\/blog\/saltstack\/attachment\/7\/\" data-orig-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/7.png?fit=678%2C486&amp;ssl=1\" data-orig-size=\"678,486\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"7\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/7.png?fit=678%2C486&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/7.png?resize=678%2C486&#038;ssl=1\" alt=\"\" class=\"wp-image-504\" srcset=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/7.png?w=678&amp;ssl=1 678w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/7.png?resize=300%2C215&amp;ssl=1 300w\" sizes=\"auto, (max-width: 678px) 100vw, 678px\" \/><\/figure><\/div>\n\n\n\n<p style=\"text-align:center\">Again, if you&#8217;re facing issues installing, I would recommend checking out the SaltStack install <a href=\"https:\/\/repo.saltstack.com\/\">page<\/a> it covers most distros and windows!<\/p>\n\n\n\n<p style=\"text-align:center\">Now that we\nhave the salt-minion installed on our distros, we need to tell the minions\nwhere to find the salt master, for this example my salt master is at 177.31.249.68.\nCreate local.conf within &#8220;\/etc\/salt\/minion.d\/&#8221; also, ensure to add\nthe correct fields:<\/p>\n\n\n\n<p style=\"text-align:center\">master: 177.31.249.68\n(Change this to your Salt Master\u2019s IP address).<\/p>\n\n\n\n<p style=\"text-align:center\">id: Mint (If\nyou wish to set an ID for your minion, for example, you could call it test box,\nSteve, Robot).<\/p>\n\n\n\n<p style=\"text-align:center\">I have also\ncreated a simple code which can create the local.conf:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo sh -c \u201cecho 'master: 177.31.249.68\nid: '$HOSTNAME'' > \/etc\/salt\/minion.d\/local.conf\u201d<\/code><\/pre>\n\n\n\n<p style=\"text-align:center\">Run within a\nterminal, creates the file local.conf within\n&#8220;\/etc\/salt\/minion.d\/local.conf&#8221; The code puts the master IP (Ensure\nto change this to your Master&#8217;s IP), and uses the hostname of the computer as\nthe id (Again, you can change this).<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"675\" height=\"467\" data-attachment-id=\"505\" data-permalink=\"https:\/\/mrjsec.co.uk\/blog\/saltstack\/attachment\/8\/\" data-orig-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/8.png?fit=675%2C467&amp;ssl=1\" data-orig-size=\"675,467\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"8\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/8.png?fit=675%2C467&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/8.png?resize=675%2C467&#038;ssl=1\" alt=\"\" class=\"wp-image-505\" srcset=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/8.png?w=675&amp;ssl=1 675w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/8.png?resize=300%2C208&amp;ssl=1 300w\" sizes=\"auto, (max-width: 675px) 100vw, 675px\" \/><\/figure><\/div>\n\n\n\n<p style=\"text-align:center\">Don&#8217;t forget\nto restart the salt-minion service or else it won&#8217;t take effect!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo service salt-minion restart<\/code><\/pre>\n\n\n\n<p style=\"text-align:center\">Now that you\nhave both your Salt Master and Salt minions installed and running, let\u2019s jump\nback to the Salt Master again and accept the minions to the salt master, using\nthe command salt-key you should (If everything has gone correctly) see all the\nminions (depending what you had named them using the id: )<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"323\" height=\"199\" data-attachment-id=\"506\" data-permalink=\"https:\/\/mrjsec.co.uk\/blog\/saltstack\/attachment\/9\/\" data-orig-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/9.png?fit=323%2C199&amp;ssl=1\" data-orig-size=\"323,199\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"9\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/9.png?fit=323%2C199&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/9.png?resize=323%2C199&#038;ssl=1\" alt=\"\" class=\"wp-image-506\" srcset=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/9.png?w=323&amp;ssl=1 323w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/9.png?resize=300%2C185&amp;ssl=1 300w\" sizes=\"auto, (max-width: 323px) 100vw, 323px\" \/><\/figure><\/div>\n\n\n\n<p style=\"text-align:center\">So, we now\nhave three minions in our \u201cUnaccepted keys\u201d, if you wish to choose which minion\nto accept the -a minion name (-a accept) for example if you wish to accept kali\nonly you would need to do the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>salt-key -a kali<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"456\" height=\"439\" data-attachment-id=\"507\" data-permalink=\"https:\/\/mrjsec.co.uk\/blog\/saltstack\/attachment\/10\/\" data-orig-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/10.png?fit=456%2C439&amp;ssl=1\" data-orig-size=\"456,439\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"10\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/10.png?fit=456%2C439&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/10.png?resize=456%2C439&#038;ssl=1\" alt=\"\" class=\"wp-image-507\" srcset=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/10.png?w=456&amp;ssl=1 456w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/10.png?resize=300%2C289&amp;ssl=1 300w\" sizes=\"auto, (max-width: 456px) 100vw, 456px\" \/><\/figure><\/div>\n\n\n\n<p style=\"text-align:center\">Now kali is\npart of our accepted keys, and if you wanted to delete a minion you would use\nthe -d (-d delete) for example let\u2019s delete kali only:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>salt-key -d kali<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"401\" height=\"295\" data-attachment-id=\"508\" data-permalink=\"https:\/\/mrjsec.co.uk\/blog\/saltstack\/11-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/11.png?fit=401%2C295&amp;ssl=1\" data-orig-size=\"401,295\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"11\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/11.png?fit=401%2C295&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/11.png?resize=401%2C295&#038;ssl=1\" alt=\"\" class=\"wp-image-508\" srcset=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/11.png?w=401&amp;ssl=1 401w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/11.png?resize=300%2C221&amp;ssl=1 300w\" sizes=\"auto, (max-width: 401px) 100vw, 401px\" \/><\/figure><\/div>\n\n\n\n<p style=\"text-align:center\"> Kali is no more, don&#8217;t worry if you deleted a minion by mistake, restart the minion service again:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo service salt-minion restart<\/code><\/pre>\n\n\n\n<p style=\"text-align:center\">Kali comes\nback, and you need to reaccept them again!<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"407\" height=\"430\" data-attachment-id=\"509\" data-permalink=\"https:\/\/mrjsec.co.uk\/blog\/saltstack\/attachment\/12\/\" data-orig-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/12.png?fit=407%2C430&amp;ssl=1\" data-orig-size=\"407,430\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"12\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/12.png?fit=407%2C430&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/12.png?resize=407%2C430&#038;ssl=1\" alt=\"\" class=\"wp-image-509\" srcset=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/12.png?w=407&amp;ssl=1 407w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/12.png?resize=284%2C300&amp;ssl=1 284w\" sizes=\"auto, (max-width: 407px) 100vw, 407px\" \/><\/figure><\/div>\n\n\n\n<p style=\"text-align:center\">Let&#8217;s move\non and to save time, use the command -A and -y (-A accepts all and -y yes) this\naccepts all unaccepted keys:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>salt-key -A -y<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"409\" height=\"366\" data-attachment-id=\"511\" data-permalink=\"https:\/\/mrjsec.co.uk\/blog\/saltstack\/attachment\/13\/\" data-orig-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/13.png?fit=409%2C366&amp;ssl=1\" data-orig-size=\"409,366\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"13\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/13.png?fit=409%2C366&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/13.png?resize=409%2C366&#038;ssl=1\" alt=\"\" class=\"wp-image-511\" srcset=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/13.png?w=409&amp;ssl=1 409w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/13.png?resize=300%2C268&amp;ssl=1 300w\" sizes=\"auto, (max-width: 409px) 100vw, 409px\" \/><\/figure><\/div>\n\n\n\n<p style=\"text-align:center\">Now we have all our minions added to our salt master if you wish to find more commands for the salt-key use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>salt-key -h<\/code><\/pre>\n\n\n\n<p style=\"text-align:center\">Shows what\ncommands are available and what they offer.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"738\" height=\"576\" data-attachment-id=\"512\" data-permalink=\"https:\/\/mrjsec.co.uk\/blog\/saltstack\/attachment\/14\/\" data-orig-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/14.png?fit=738%2C576&amp;ssl=1\" data-orig-size=\"738,576\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"14\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/14.png?fit=700%2C546&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/14.png?fit=700%2C546&amp;ssl=1\" alt=\"\" class=\"wp-image-512\" srcset=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/14.png?w=738&amp;ssl=1 738w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/14.png?resize=300%2C234&amp;ssl=1 300w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/14.png?resize=700%2C546&amp;ssl=1 700w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n\n<p style=\"text-align:center\">Now let\u2019s\nmove onto issuing commands to our minions from the salt master, the first\ncommand (and mostly always noted) is the ping command, this command tells you\nif the minion is online and if the master can &#8220;speak&#8221; to them:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>salt '*' test.ping<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"404\" height=\"201\" data-attachment-id=\"513\" data-permalink=\"https:\/\/mrjsec.co.uk\/blog\/saltstack\/attachment\/15\/\" data-orig-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/15.png?fit=404%2C201&amp;ssl=1\" data-orig-size=\"404,201\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"15\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/15.png?fit=404%2C201&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/15.png?resize=404%2C201&#038;ssl=1\" alt=\"\" class=\"wp-image-513\" srcset=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/15.png?w=404&amp;ssl=1 404w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/15.png?resize=300%2C149&amp;ssl=1 300w\" sizes=\"auto, (max-width: 404px) 100vw, 404px\" \/><\/figure><\/div>\n\n\n\n<p style=\"text-align:center\">All of our minions are awake, and the salt master can &#8220;speak&#8221; to them, let\u2019s try another command and this time let\u2019s try and issue a terminal command from the salt master to the minions using cmd.run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>salt '*' cmd.run 'df -h'<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"524\" height=\"601\" data-attachment-id=\"514\" data-permalink=\"https:\/\/mrjsec.co.uk\/blog\/saltstack\/attachment\/16\/\" data-orig-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/16.png?fit=524%2C601&amp;ssl=1\" data-orig-size=\"524,601\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"16\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/16.png?fit=524%2C601&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/16.png?resize=524%2C601&#038;ssl=1\" alt=\"\" class=\"wp-image-514\" srcset=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/16.png?w=524&amp;ssl=1 524w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/16.png?resize=262%2C300&amp;ssl=1 262w\" sizes=\"auto, (max-width: 524px) 100vw, 524px\" \/><\/figure><\/div>\n\n\n\n<p style=\"text-align:center\">So, we have\ntold the minions to issue the command df -h (df is a Unix command to show the disk\nspace) SaltStack automatedly returns the results and errors if any! Let\u2019s issue\nsome more commands.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"894\" height=\"705\" data-attachment-id=\"515\" data-permalink=\"https:\/\/mrjsec.co.uk\/blog\/saltstack\/attachment\/17\/\" data-orig-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/17.png?fit=894%2C705&amp;ssl=1\" data-orig-size=\"894,705\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"17\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/17.png?fit=700%2C552&amp;ssl=1\" src=\"https:\/\/i1.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/17.png?fit=700%2C552&amp;ssl=1\" alt=\"\" class=\"wp-image-515\" srcset=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/17.png?w=894&amp;ssl=1 894w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/17.png?resize=300%2C237&amp;ssl=1 300w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/17.png?resize=768%2C606&amp;ssl=1 768w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/17.png?resize=700%2C552&amp;ssl=1 700w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n\n<p style=\"text-align:center\">We just issued whoami, pwd, w and even did an echo, all from one salt master! You noticed we use the \u2018*&#8217; a lot, and this means to send the commands to all minions (* is a wildcard). If you only wanted to send commands to one minion you would change the \u2018*\u2019 with the id name of that minion, for example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>salt \u2018Mate\u2019 cmd.run \u2018command here.'<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"901\" height=\"680\" data-attachment-id=\"516\" data-permalink=\"https:\/\/mrjsec.co.uk\/blog\/saltstack\/attachment\/18\/\" data-orig-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/18.png?fit=901%2C680&amp;ssl=1\" data-orig-size=\"901,680\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"18\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/18.png?fit=700%2C528&amp;ssl=1\" src=\"https:\/\/i2.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/18.png?fit=700%2C528&amp;ssl=1\" alt=\"\" class=\"wp-image-516\" srcset=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/18.png?w=901&amp;ssl=1 901w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/18.png?resize=300%2C226&amp;ssl=1 300w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/18.png?resize=768%2C580&amp;ssl=1 768w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/18.png?resize=700%2C528&amp;ssl=1 700w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n\n<p style=\"text-align:center\">Salt master issued the commands only to the Mate minion, and only the Mate minion gave back any results, parrot and kali didn\u2019t, this is how you can issue commands to one minion at a time. However, if you wish to issue commands to multiple minions you would need to use -L (-L Take a comma or space delimited list of minions.) which would be something like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>salt -L 'Mate,kali' cmd.run 'uname -a' <\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"897\" height=\"438\" data-attachment-id=\"517\" data-permalink=\"https:\/\/mrjsec.co.uk\/blog\/saltstack\/attachment\/19\/\" data-orig-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/19.png?fit=897%2C438&amp;ssl=1\" data-orig-size=\"897,438\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"19\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/19.png?fit=700%2C342&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/19.png?fit=700%2C342&amp;ssl=1\" alt=\"\" class=\"wp-image-517\" srcset=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/19.png?w=897&amp;ssl=1 897w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/19.png?resize=300%2C146&amp;ssl=1 300w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/19.png?resize=768%2C375&amp;ssl=1 768w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/19.png?resize=700%2C342&amp;ssl=1 700w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n\n<p style=\"text-align:center\">Now, the\nsalt master is issuing commands to Mate and kali only and is getting results\nback from Mate and kali only, and parrot doesn&#8217;t do anything. Now let\u2019s do\nsomething a bit more fun, let\u2019s run a nmap scan from one of our salt minions\nand get the results back kind of like a Zombie. <\/p>\n\n\n\n<p style=\"text-align:center\">Let&#8217;s use\nthe minion Mate this way we can install a package using the salt master:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>salt 'Mate' cmd.run 'apt install nmap -y'<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"898\" height=\"703\" data-attachment-id=\"518\" data-permalink=\"https:\/\/mrjsec.co.uk\/blog\/saltstack\/attachment\/20\/\" data-orig-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/20.png?fit=898%2C703&amp;ssl=1\" data-orig-size=\"898,703\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"20\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/20.png?fit=700%2C548&amp;ssl=1\" src=\"https:\/\/i2.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/20.png?fit=700%2C548&amp;ssl=1\" alt=\"\" class=\"wp-image-518\" srcset=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/20.png?w=898&amp;ssl=1 898w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/20.png?resize=300%2C235&amp;ssl=1 300w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/20.png?resize=768%2C601&amp;ssl=1 768w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/20.png?resize=700%2C548&amp;ssl=1 700w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n\n<p style=\"text-align:center\">Nmap\ninstalled successfully on the Mate minion, and now we issue the following\ncommand:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>salt 'Mate' cmd.run 'nmap -p 1-100 scanme.nmap.org'<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"805\" height=\"285\" data-attachment-id=\"519\" data-permalink=\"https:\/\/mrjsec.co.uk\/blog\/saltstack\/21-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/21.png?fit=805%2C285&amp;ssl=1\" data-orig-size=\"805,285\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"21\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/21.png?fit=700%2C248&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/21.png?fit=700%2C248&amp;ssl=1\" alt=\"\" class=\"wp-image-519\" srcset=\"https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/21.png?w=805&amp;ssl=1 805w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/21.png?resize=300%2C106&amp;ssl=1 300w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/21.png?resize=768%2C272&amp;ssl=1 768w, https:\/\/i0.wp.com\/mrjsec.co.uk\/blog\/wp-content\/uploads\/2019\/03\/21.png?resize=700%2C248&amp;ssl=1 700w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n\n<p style=\"text-align:center\">So, we were\nable to install nmap and then perform a nmap scan just from the salt master and\nnothing else, from a security point of view you can see how \u201cfun\u201d this can be,\nyou\u2019re able to run any Linux command in root mode without being asked for the\nroot password (unless changed within he minion settings).<\/p>\n\n\n\n<p style=\"text-align:center\">SaltStack is a big project, as I said at the start of this guide, I won\u2019t be covering everything about SaltStack as there is a lot to cover! Such as states, Pillars, Grains and so much more. <a href=\"https:\/\/docs.saltstack.com\/en\/latest\/\">SaltStack Documentation<\/a> is a great place to start.<\/p>\n\n\n\n<p style=\"text-align:center\">I hope you\nhave enjoyed my little guide on SaltStack.<\/p>\n\n\n\n<p style=\"text-align:center\">Thanks for reading!<br> -Mr J <\/p>\n\n\n\n<p style=\"text-align:center\"> \u201cMade for educational purposes Only.\u201d <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I won&#8217;t be creating a full guide on how to use SaltStack, just a simple setup guide. More information on SaltStack is on their website here. Installing the salt master is simple and can be&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"<center>A small but simple guide on how to use SaltStack on Linux<\/center>","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[19],"tags":[23,22,25,24,20,21],"class_list":["post-497","post","type-post","status-publish","format-standard","hentry","category-linux-stuff","tag-kali","tag-linux","tag-mint","tag-parrot","tag-salt","tag-saltstack"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paD3U6-81","_links":{"self":[{"href":"https:\/\/mrjsec.co.uk\/blog\/wp-json\/wp\/v2\/posts\/497","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mrjsec.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mrjsec.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mrjsec.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mrjsec.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=497"}],"version-history":[{"count":5,"href":"https:\/\/mrjsec.co.uk\/blog\/wp-json\/wp\/v2\/posts\/497\/revisions"}],"predecessor-version":[{"id":524,"href":"https:\/\/mrjsec.co.uk\/blog\/wp-json\/wp\/v2\/posts\/497\/revisions\/524"}],"wp:attachment":[{"href":"https:\/\/mrjsec.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mrjsec.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=497"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mrjsec.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}