As usual, in every Python module, we first need to import it into our Python script, then we will create an SSH client by inheriting from SSHClient(). After that, we will configure the Paramiko to automatically add any unknown host-key and trust the connection between you and the server. Then, we will use the connect function and provide the remote host credentials:
#!/usr/bin/python__author__ = "Bassim Aly"__EMAIL__ = "basim.alyy@gmail.com"import paramikoimport timeChannel = paramiko.SSHClient()Channel.set_missing_host_key_policy(paramiko.AutoAddPolicy())Channel.connect(hostname="10.10.88.112", username='admin', password='access123', look_for_keys=False,allow_agent=False)shell = Channel.invoke_shell()