salt.states.ssh_known_hosts

### Navigation

- index
- modules |
- next |
- previous |
- « SaltStack.org |
- Documentation home
- Full list of builtin state modules »

# salt.states.ssh_known_hosts

## Control of SSH known_hosts entries.

Manage the information stored in the known_hosts files

    github.com:
      ssh_known_hosts:
        - present
        - user: root
        - fingerprint: 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48

    example.com:
      ssh_known_hosts:
        - absent
        - user: root

`salt.states.ssh_known_hosts.` `absent`(name, user, config='.ssh/known_hosts')

  Verifies that the specified host is not known by the given user

  name
    The host name
  user
    The user who owns the ssh authorized keys file to modify
  config
    The location of the authorized keys file relative to the user's home directory, defaults to ".ssh/known_hosts"

`salt.states.ssh_known_hosts.` `present`(name, user, fingerprint=None, port=None, enc=None, config='.ssh/known_hosts')

  Verifies that the specified host is known by the specified user

  name
    The name of the remote host (i.e. "github.com")
  user
    The user who owns the ssh authorized keys file to modify
  enc
    Defines what type of key is being used, can be ssh-rsa or ssh-dss
  fingerprint
    The fingerprint of the key which must be presented in the known_hosts file
  port
    optional parameter, denoting the port of the remote host, which will be used in case, if the public key will be requested from it. By default the port 22 is used.
  config
    The location of the authorized keys file relative to the user's home directory, defaults to ".ssh/known_hosts"

## Comments

comments powered by Disqus

### Navigation

- index
- modules |
- next |
- previous |
- « SaltStack.org |
- Documentation home
- Full list of builtin state modules »