Need to disable Remote Login in MAC OS X

Need help to creating a relevance fixlet to identify whether the Remote Login option is checked or unchecked in System Pref>Sharing>Remote Login or not.

What plist is this setting controlled by?

Hi, I am referring com.apple.access_ssh.plist , although the solution has already been available in bigfix form. refer below relevance…

not (if (system version < "10.10") then (exists file "/var/db/launchd.db/com.apple.launchd/overrides.plist" whose (exists dictionary "com.openssh.sshd" whose (exists boolean "Disabled" whose (it = False) of it) of dictionary of it)) else (exists file "/var/db/com.apple.xpc.launchd/disabled.plist" whose (exists boolean "com.openssh.sshd" whose (it = False) of dictionary of it)) AND (not exists file "/var/db/dslocal/nodes/Default/groups/com.apple.access_ssh-disabled.plist") AND (exists file "/var/db/dslocal/nodes/Default/groups/com.apple.access_ssh.plist" whose (exists array "nestedgroups" whose (concatenation ", " of strings of values of it contains (string of values of array "generateduid" of dictionary of file "/var/db/dslocal/nodes/Default/groups/admin.plist")) of dictionary of it))) 

But the requirement to check whether the “Remote Login” option is enabled or not in MAC OS X 10.10.

Where is this plist located? What is the absolute path?

Hi, the location is : /var/db/dslocal/nodes/Default/groups/com.apple.access_ssh.plist

Please Note : The VAR directory is hidden, you need to unhide this to see subfolders.

1 Like

Oh, sorry. I didn’t see that in the relevance until you included it in your reply by itself. It was a bit hard to tell what was what in all of that relevance.

An example:

<?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>comment</key>
	<array>
		<string>SSH Service ACL</string>
	</array>
	<key>generateduid</key>
	<array>
		<string>-redacted-</string>
	</array>
	<key>gid</key>
	<array>
		<string>123</string>
	</array>
	<key>name</key>
	<array>
		<string>com.apple.access_ssh</string>
	</array>
	<key>nestedgroups</key>
	<array>
		<string>-redacted-</string>
	</array>
	<key>passwd</key>
	<array>
		<string>*</string>
	</array>
	<key>realname</key>
	<array>
		<string>SSH Service ACL</string>
	</array>
</dict>
</plist>

Are you certain this is the plist that is changed when that box is checked or unchecked?

Nothing is going to change in this plist, when I am checking or unchecking the remote login checkbox.

What does change when you check or uncheck the remote login box? It is most likely a plist, but I have no idea where.

Once that is known, then relevance can be written against that location to determine the current state of the checkbox, and then actionscript can be written to change it.

That is the main concern, I am also searching where the contents or value is updating under Plist … but only the time stamp is changing nothing else during check or uncheck the option.

Need guidance on this…