def task_enable_root_logins(distribution):
 commands = [sudo_from_args(['sed', '-i', '1 i PermitRootLogin yes', '/etc/ssh/sshd_config'])]
 if is_systemd_distribution(distribution):
  commands.append(sudo_from_args(['systemctl', 'restart', 'sshd']))
 else:
  commands.append(sudo_from_args(['service', 'ssh', 'restart']))
 return sequence(commands)

def task_enable_root_logins ( distribution ) : commands = [ sudo_from_args ( [ 'sed' , '-i' , '1 i PermitRootLogin yes' , '/etc/ssh/sshd_config' ] ) ] if is_systemd_distribution ( distribution ) : commands . append ( sudo_from_args ( [ 'systemctl' , 'restart' , 'sshd' ] ) ) else : commands . append ( sudo_from_args ( [ 'service' , 'ssh' , 'restart' ] ) ) return sequence ( commands )
configure the ssh server to allow root login .