'Remove all network names for nodes from username\'s known_hosts file
on this Node'

def remove_from_known_hosts(self, username, nodes):

    user = self.getpwnam(username)
    known_hosts_file = posixpath.join(user.pw_dir, '.ssh', 'known_hosts')
    hostnames = []
    for node in nodes:
        hostnames += [node.alias, node.private_dns_name, node.private_dns_name_short, node.public_dns_name]
    if self.ssh.isfile(known_hosts_file):
        regex = '|'.join(hostnames)
        self.ssh.remove_lines_from_file(known_hosts_file, regex)
