Failed to connect to using ParamikoMachine/SshMachine in plumbum

Suresh Kota Source

I have the following code to connect to using ParamikoMachine in plumbum.machines and it is failing.

from plumbum.machines.paramiko_machine import ParamikoMachine
from rpyc.utils.zerodeploy import DeployedServer

ip_addr = ""

# create the deployment
mach = ParamikoMachine(ip_addr, user="root", password="password")

server = DeployedServer(mach)


Traceback (most recent call last): File "", line 14, in mach = ParamikoMachine(ip_addr, user="root", password="password") File "/home/user/venv/lib/python3.5/site-packages/plumbum/machines/", line 205, in init self._client.connect(host, **kwargs) File "/home/user/venv/lib/python3.5/site-packages/paramiko/", line 402, in connect self, server_hostkey_name, server_key File "/home/user/venv/lib/python3.5/site-packages/paramiko/", line 768, in missing_host_key 'Server {!r} not found in known_hosts'.format(hostname) paramiko.ssh_exception.SSHException: Server '' not found in known_hosts

Is there a way to add missing_host_key similar to paramiko's set_missing_host_key_policy(paramiko.AutoAddPolicy()) in ParamikoMachine as well? Any ideas on how to resolve this error!!



comments powered by Disqus