def METHOD_NAME(self) -> None:
    known_hosts_file = self._identity_dir + "/known_hosts"
    with open(known_hosts_file, "w") as f:
        f.write(self._known_hosts)
    os.chmod(known_hosts_file, 0o600)
    self.known_hosts_file = known_hosts_file