sshmitm.clients.netconf module
- class sshmitm.clients.netconf.NetconfClient(host, port, method, password, user, key, session)
Bases:
SSHClientThe SSH client class, used to connect to a remote host with the netconf subsystem.
- Parameters:
host (
str) – the hostname or IP address of the remote hostport (
int) – the port number to connect to on the remote hostmethod (
AuthenticationMethod) – the authentication method to use when connectingpassword (
str|None) – the password to use for authentication (if method is password)user (
str) – the username to use for authenticationkey (
PKey|None) – the public key to use for authentication (if method is publickey)session (
Session) – the session instance
- close()
- Return type:
None
- classmethod from_client(ssh_client)
Create an NetconfClient instance from an SSHClient instance.
- Parameters:
ssh_client (
SSHClient|None) – The SSHClient instance.- Return type:
Optional[NetconfClient]- Returns:
An NetconfClient instance, or None if the NetconfClient could not be created.
- property running: bool
Indicate whether the netconf client is running.
- Returns:
Whether the netconf client is running.