Below is the file 'client/plugins/opensshconfig.py' from this revision. You can also download the file.


from phonehome import urgency

def run():
    results = []
    sshd_config_file = '/etc/ssh/sshd_config'
    for line in open(sshd_config_file):
	line = line.strip().lower()
	fields = [t for t in line.split(' ') if t]
	if len(fields) != 2:
	    continue
	key, value = fields
	if key == 'permitrootlogin':
	    if value == 'yes':
		results.append((urgency['alert'], "Root may log in using a password."))
    return results