paramiko.AutoAddPolicy

Package paramiko :: Class AutoAddPolicy |
[frames] | no frames]

# Class AutoAddPolicy

source code

              object --+
                       |
    MissingHostKeyPolicy --+
                           |
                          AutoAddPolicy

Policy for automatically adding the hostname and new host key to the local HostKeys object, and saving it. This is used by SSHClient.

Instance Methods
missing_host_key(self, client, hostname, key) Called when an SSHClient receives a server key for a server that isn't in either the system or local HostKeys object. | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__init__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties
Inherited from `object`: `__class__`

Method Details

### missing_host_key(self, client, hostname, key) | source code
Called when an SSHClient receives a server key for a server that isn't in either the system or local HostKeys object. To accept the key, simply return. To reject, raised an exception (which will be passed to the calling application). Overrides: MissingHostKeyPolicy.missing_host_key (inherited documentation)