Skip to content

Instantly share code, notes, and snippets.

@jaknz
Created February 11, 2016 21:58
Show Gist options
  • Save jaknz/3d1acfb60a444d40c6d0 to your computer and use it in GitHub Desktop.
Save jaknz/3d1acfb60a444d40c6d0 to your computer and use it in GitHub Desktop.
Enable SSH via Munki
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>_metadata</key>
<dict>
<key>created_by</key>
<string>jaknz</string>
<key>creation_date</key>
<date>2015-11-12T00:54:58Z</date>
<key>munki_version</key>
<string>2.2.0.2381</string>
<key>os_version</key>
<string>10.9.5</string>
</dict>
<key>autoremove</key>
<false/>
<key>catalogs</key>
<array>
<string>approved</string>
<string>testing</string>
</array>
<key>category</key>
<string>Configuration</string>
<key>description</key>
<string>Enable SSH on client machines</string>
<key>developer</key>
<string>Jeremy Kemp</string>
<key>display_name</key>
<string>Enable SSH</string>
<key>icon_name</key>
<string>AppleChrome.png</string>
<key>installcheck_script</key>
<string>#!/bin/bash
if [[ $(/usr/sbin/systemsetup -getremotelogin) =~ On ]]; then
exit 1 #SSH is enabled
else
exit 0 #SSH is disabled
fi
exit 0</string>
<key>installed_size</key>
<integer>0</integer>
<key>installer_item_size</key>
<integer>0</integer>
<key>installer_type</key>
<string>nopkg</string>
<key>minimum_os_version</key>
<string>10.5</string>
<key>name</key>
<string>EnableSSH_True</string>
<key>preinstall_script</key>
<string>#!/bin/bash
/usr/sbin/systemsetup -f -setremotelogin on
exit 0</string>
<key>receipts</key>
<array/>
<key>unattended_install</key>
<true/>
<key>uninstallable</key>
<false/>
<key>version</key>
<string>1.0</string>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment