@decorators.which('ssh-keygen')
def get_known_host(user, hostname, config=None, port=None):
 full = _get_known_hosts_file(config=config, user=user)
 if isinstance(full, dict):
  return full
 ssh_hostname = _hostname_and_port_to_ssh_hostname(hostname, port)
 cmd = ['ssh-keygen', '-F', ssh_hostname, '-f', full]
 lines = __salt__['cmd.run'](cmd, ignore_retcode=True, python_shell=False).splitlines()
 known_hosts = list(_parse_openssh_output(lines))
 return (known_hosts[0] if known_hosts else None)

@ decorators . which ( 'ssh-keygen' ) def get_known_host ( user , hostname , config = None , port = None ) : full = _get_known_hosts_file ( config = config , user = user ) if isinstance ( full , dict ) : return full ssh_hostname = _hostname_and_port_to_ssh_hostname ( hostname , port ) cmd = [ 'ssh-keygen' , '-F' , ssh_hostname , '-f' , full ] lines = __salt__ [ 'cmd.run' ] ( cmd , ignore_retcode = True , python_shell = False ) . splitlines ( ) known_hosts = list ( _parse_openssh_output ( lines ) ) return ( known_hosts [ 0 ] if known_hosts else None )
return information about known host from the configfile .